Solution to problem 13 in Julia
This commit is contained in:
parent
6c9c246f56
commit
88d72d2a76
27
src/Julia/Problem013.jl
Normal file
27
src/Julia/Problem013.jl
Normal file
@ -0,0 +1,27 @@
|
||||
using Base: String
|
||||
#=
|
||||
Created on 22 Jul 2021
|
||||
|
||||
@author: David Doblas Jiménez
|
||||
@email: daviddoji@pm.me
|
||||
|
||||
Solution for Problem 13 of Project Euler
|
||||
https://projecteuler.net/problem=13
|
||||
=#
|
||||
|
||||
using DoubleFloats
|
||||
# using JSON
|
||||
|
||||
function Problem13()
|
||||
#=
|
||||
Work out the first ten digits of the sum of the following one-hundred
|
||||
50-digit numbers
|
||||
=#
|
||||
return string(sum(parse.(BigInt,readlines("../Python/files/Problem13.txt"))))[1:10]
|
||||
end
|
||||
|
||||
|
||||
println("Time to evaluate Problem 13:")
|
||||
@time Problem13()
|
||||
println("")
|
||||
println("Result for Problem 13: ", Problem13())
|
Loading…
x
Reference in New Issue
Block a user