Refactor output
This commit is contained in:
parent
9bd496d356
commit
e810cdaf1d
@ -10,7 +10,7 @@ https://projecteuler.net/problem=23
|
||||
|
||||
using BenchmarkTools
|
||||
|
||||
function Problem23()
|
||||
function Problem023()
|
||||
#=
|
||||
A perfect number is a number for which the sum of its proper divisors is
|
||||
exactly equal to the number. For example, the sum of the proper divisors
|
||||
@ -31,6 +31,7 @@ function Problem23()
|
||||
Find the sum of all the positive integers which cannot be written as the
|
||||
sum of two abundant numbers.
|
||||
=#
|
||||
|
||||
LIMIT = 28123
|
||||
divisorsum = zeros(Int32, LIMIT)
|
||||
for i in range(1, LIMIT, step = 1)
|
||||
@ -56,7 +57,7 @@ function Problem23()
|
||||
end
|
||||
|
||||
|
||||
println("Time to evaluate Problem $(lpad(23, 3, "0")):")
|
||||
@btime Problem23()
|
||||
println("Took:")
|
||||
@btime Problem023()
|
||||
println("")
|
||||
println("Result for Problem $(lpad(23, 3, "0")): ", Problem23())
|
||||
println("Result for Problem $(lpad(23, 3, "0")): ", Problem023())
|
||||
|
Loading…
x
Reference in New Issue
Block a user