2009-06-20から1日間の記事一覧
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