Type annotations
This commit is contained in:
parent
eaf103a283
commit
f3b932a04e
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user