# Project Euler Problem 20

Project Euler Problem 20 solution is straigthforward, indeed:

let factorial (n: bigint) : bigint = [1I..n] |> List.reduce (*) let problem020 () = factorial 100I |> fun x -> x.ToString().ToCharArray() |> Array.map (fun x -> (int x) - (int '0')) |> Array.sum

Advertisements

Leave a Comment