Solution to problem 10 in Julia

This commit is contained in:
David Doblas Jiménez 2021-07-03 16:41:59 +02:00
parent 041066da0e
commit d973833082

27
src/Julia/Problem010.jl Normal file
View File

@ -0,0 +1,27 @@
#=
Created on 03 Jul 2021
@author: David Doblas Jiménez
@email: daviddoji@pm.me
Solution for Problem 10 of Project Euler
https://projecteuler.net/problem=10
=#
using Primes
function Problem10()
#=
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
=#
return sum(primes(1_999_999))
end
println("Time to evaluate Problem 10:")
@time Problem10()
println("")
println("Result for Problem 10: ", Problem10())