diff --git a/fortran/src/p0020.f90 b/fortran/src/p0020.f90 index 5bb73497..8ffb2f82 100644 --- a/fortran/src/p0020.f90 +++ b/fortran/src/p0020.f90 @@ -13,7 +13,7 @@ module Problem0020 use constants implicit none contains - pure integer function p0020() result(answer) + pure integer(i18t) function p0020() result(answer) integer(i18t), dimension(10) :: numbers integer(i18t) :: power integer :: i, j diff --git a/lua/src/p0020.lua b/lua/src/p0020.lua index fd5b150a..0e13b283 100644 --- a/lua/src/p0020.lua +++ b/lua/src/p0020.lua @@ -26,7 +26,7 @@ return { end end end - for i = 1,16 do + for _ = 1,16 do for j = 1,#numbers do answer = answer + math.floor(numbers[j] / power) % 10 end