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,20 +4,22 @@ Created on 24 Jun 2021
@author: David Doblas Jiménez
@email: daviddoji@pm.me
Solution for Problem 7 of Project Euler
https://projecteuler.net/problem=7 =#
Solution for Problem 007 of Project Euler
https://projecteuler.net/problem=7
=#
using BenchmarkTools
using Primes
using Transducers
function Problem7()
function Problem007()
#=
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
we can see that the 6th prime is 13.
What is the 10_001st prime number =#
What is the 10_001st prime number
=#
count::Int32 = 10_000
# 2 is prime but not included to speed-up
@@ -36,7 +38,7 @@ function Problem7()
end
println("Time to evaluate Problem $(lpad(7, 3, "0")):")
@btime Problem7()
println("Took:")
@btime Problem007()
println("")
println("Result for Problem $(lpad(7, 3, "0")): ", Problem7())
println("Result for Problem $(lpad(7, 3, "0")): ", Problem007())