Improve performance
This commit is contained in:
parent
330116f70c
commit
45338f7fdd
@ -36,9 +36,9 @@ function Problem12()
|
||||
=#
|
||||
|
||||
function num_divisors(n)
|
||||
res = floor(sqrt(n))
|
||||
res = floor(Int, sqrt(n))
|
||||
divs = []
|
||||
for i in 1:res
|
||||
for i = 1:res
|
||||
if n % i == 0
|
||||
append!(divs, i)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user