Problem 13

Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.

そのまま。

main =replicateM 100 (liftM read getLine)>>=putStrLn.(take 10).show.sum
{--
$ time ./p010.exe < p013.txt
5537376230
./p010.exe < p013.txt  0.01s user 0.06s system 17% cpu 0.450 total
--}
More Reading
Newer// Problem 29
Older// Problem 14