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