Sum and product puzzle: Difference between revisions
m
no edit summary
mNo edit summary |
|||
Line 774:
using filters would be much slower in Julia, which often favors fast for loops over lists for speed.
<lang Julia>
function
primeslt100list = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
for i in 2:Int(floor(x/2))
if(
return false
end
Line 788 ⟶ 784:
true
end
function satisfies2(x)
|