Refactor output

This commit is contained in:
2023-04-01 18:12:04 +02:00
parent 75d29d32e6
commit fdf280d070
10 changed files with 88 additions and 68 deletions

View File

@@ -4,8 +4,9 @@ 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 =#
Solution for Problem 010 of Project Euler
https://projecteuler.net/problem=10
=#
using BenchmarkTools
using Primes
@@ -14,13 +15,14 @@ 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. =#
Find the sum of all the primes below two million.
=#
return sum(primes(1_999_999))
end
println("Time to evaluate Problem $(lpad(10, 3, "0")):")
@btime Problem10()
println("Took:")
@btime Problem010()
println("")
println("Result for Problem $(lpad(10, 3, "0")): ", Problem10())
println("Result for Problem $(lpad(10, 3, "0")): ", Problem010())