This commit is contained in:
David Doblas Jiménez
2021-10-27 11:27:14 +02:00
parent 846a9343ae
commit d9c96f32cf
51 changed files with 315 additions and 366 deletions

View File

@@ -1,21 +1,19 @@
#=
#=
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
=#
https://projecteuler.net/problem=3 =#
using BenchmarkTools
function Problem3()
#=
#=
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
@@ -30,7 +28,7 @@ function Problem3()
end
println("Time to evaluate Problem 3:")
println("Time to evaluate Problem $(lpad(3, 3, "0")):")
@btime Problem3()
println("")
println("Result for Problem 3: ", Problem3())
println("Result for Problem $(lpad(3, 3, "0")): ", Problem3())