2009-06-21から1日間の記事一覧
http://projecteuler.net/index.php?section=problems&id=17 1から1000を英語で書いた場合の文字数 main = print $ length $ foldl1 (++) $ map toWords [1..1000] toWords :: Int -> String toWords 1000 = "one" ++ "thousand" toWords n = let h = n `div…
http://projecteuler.net/index.php?section=problems&id=17 1から1000を英語で書いた場合の文字数 main = print $ length $ foldl1 (++) $ map toWords [1..1000] toWords :: Int -> String toWords 1000 = "one" ++ "thousand" toWords n = let h = n `div…