Project Euler Problem 16
http://projecteuler.net/index.php?section=problems&id=16
21000の各桁の和
import Char main = print $ sumOfDigits $ 2 ^ 1000 sumOfDigits :: Integer -> Int sumOfDigits = sum . map digitToInt . show
http://projecteuler.net/index.php?section=problems&id=16
21000の各桁の和
import Char main = print $ sumOfDigits $ 2 ^ 1000 sumOfDigits :: Integer -> Int sumOfDigits = sum . map digitToInt . show