This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
project-euler/e0010/euler0010.jl
2017-08-09 12:52:06 +02:00

13 lines
263 B
Julia

#!/usr/bin/julia
import Primes
function sumprimes(n::Int)
#primnumbers = SharedArray{Int}(n)
primesum=2
parasum = @parallel (+) for i in 3:2:n
Primes.isprime(i)*i
end
primesum+=parasum
end
sumprimes(10)
@time prime = sumprimes(2000000)
print(prime)