Refactor output

This commit is contained in:
David Doblas Jiménez 2023-08-28 18:38:29 +02:00
parent 1209566e4a
commit e2f035d386

View File

@ -32,9 +32,9 @@ function Problem23()
sum of two abundant numbers.
=#
LIMIT = 28123
divisorsum = zeros(Int32,LIMIT)
for i in range(1, LIMIT, step=1)
for j in range(2i, LIMIT, step=i)
divisorsum = zeros(Int32, LIMIT)
for i in range(1, LIMIT, step = 1)
for j in range(2i, LIMIT, step = i)
divisorsum[j] += i
end
end
@ -43,8 +43,8 @@ function Problem23()
expressible = falses(LIMIT)
for i in abundantnums
for j in abundantnums
if i + j < LIMIT+1
expressible[i + j] = true
if i + j < LIMIT + 1
expressible[i+j] = true
else
break
end