Fix EOF
This commit is contained in:
@@ -5,8 +5,7 @@ Created on 20 Sep 2021
|
||||
@email: daviddoji@pm.me
|
||||
|
||||
Solution for Problem 50 of Project Euler
|
||||
https://projecteuler.net/problem=50
|
||||
=#
|
||||
https://projecteuler.net/problem=50 =#
|
||||
|
||||
using BenchmarkTools
|
||||
using Primes
|
||||
@@ -19,11 +18,10 @@ function Problem50()
|
||||
|
||||
This is the longest sum of consecutive primes that adds to a prime below one-hundred.
|
||||
|
||||
The longest sum of consecutive primes below one-thousand that adds to a prime,
|
||||
The longest sum of consecutive primes below one-thousand that adds to a prime,
|
||||
contains 21 terms, and is equal to 953.
|
||||
|
||||
Which prime, below one-million, can be written as the sum of the most consecutive primes?
|
||||
=#
|
||||
Which prime, below one-million, can be written as the sum of the most consecutive primes? =#
|
||||
|
||||
ans = 0
|
||||
result = 0
|
||||
@@ -48,7 +46,7 @@ function Problem50()
|
||||
end
|
||||
|
||||
|
||||
println("Time to evaluate Problem 50:")
|
||||
println("Time to evaluate Problem $(lpad(50, 3, "0")):")
|
||||
@btime Problem50()
|
||||
println("")
|
||||
println("Result for Problem 50: ", Problem50())
|
||||
println("Result for Problem $(lpad(50, 3, "0")): ", Problem50())
|
||||
|
||||
Reference in New Issue
Block a user