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,16 +4,18 @@ Created on 15 Jun 2021
@author: David Doblas Jiménez
@email: daviddoji@pm.me
Solution for Problem 3 of Project Euler
https://projecteuler.net/problem=3 =#
Solution for Problem 003 of Project Euler
https://projecteuler.net/problem=3
=#
using BenchmarkTools
function Problem3()
function Problem003()
#=
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ? =#
What is the largest prime factor of the number 600851475143 ?
=#
ans = 600_851_475_143
factor = 2
@@ -28,7 +30,7 @@ function Problem3()
end
println("Time to evaluate Problem $(lpad(3, 3, "0")):")
@btime Problem3()
println("Took:")
@btime Problem003()
println("")
println("Result for Problem $(lpad(3, 3, "0")): ", Problem3())
println("Result for Problem $(lpad(3, 3, "0")): ", Problem003())