Skip to content

Commit

Permalink
Solve p16 in fortran (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 10, 2024
1 parent 18b1903 commit 13a15e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fortran/src/p0016.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pure integer(i18t) function p0016() result(answer)
integer(i18t), dimension(18) :: numbers
integer(i18t) :: power
integer :: i, j
integer :: i

numbers = 0
numbers(1) = 1
Expand All @@ -34,7 +33,7 @@ pure integer(i18t) function p0016() result(answer)
power = 1
do i = 1, 18
do j = 1, size(numbers)
answer = answer + mod((numbers(j) / power), 10)
answer = answer + mod((numbers(j) / power), 10_i18t)
end do
power = power * 10
end do
Expand Down

0 comments on commit 13a15e9

Please sign in to comment.