diff --git a/src/Julia/Problems001-050/Problem020.jl b/src/Julia/Problems001-050/Problem020.jl index 6b02a92..b9ade14 100644 --- a/src/Julia/Problems001-050/Problem020.jl +++ b/src/Julia/Problems001-050/Problem020.jl @@ -18,8 +18,10 @@ function Problem20() 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits in the number 100! =# - fact = factorial(big(100)) - return sum(parse(Int, d) for d in string(fact)) + + fact::BigInt = factorial(big(100)) + + return sum(parse(Int8, d) for d::Char = string(fact)) end