{"url":"https://argius.hatenablog.jp/entry/20061224/1166942261","image_url":null,"blog_title":"argius note","author_name":"argius","blog_url":"https://argius.hatenablog.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fargius.hatenablog.jp%2Fentry%2F20061224%2F1166942261\" title=\"\u6574\u6570\u306b\u5909\u63db\u3057\u3066\u968e\u4e57 - argius note\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","title":"\u6574\u6570\u306b\u5909\u63db\u3057\u3066\u968e\u4e57","version":"1.0","categories":["Haskell"],"author_url":"https://blog.hatena.ne.jp/argius/","published":"2006-12-24 15:37:41","description":"\u4eca\u5ea6\u306f\u5b9f\u884c\u6642\u5f15\u6570\u304c2\u6841\u4ee5\u4e0a\u3067\u3082\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u6587\u5b57\u5217\u3092\u6574\u6570\u306b\u5909\u63db\u3059\u308b\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3057\u305f\u3002 \u968e\u4e57\u306e\u95a2\u6570\u306f\u3001\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u3067\u306a\u304f\u30ac\u30fc\u30c9\u3067\u3084\u3063\u3066\u3044\u307e\u3059\u3002 import System import Char atoi :: [Char] -> Int atoi [c] = digitToInt c atoi (c:cs) = atoi [c] * 10 ^ length cs + atoi cs fact n | n < 1 = 1 | otherwise = n * fact (n - 1) main = do cs <- getArgs print $ fact $ atoi $ head cs\u2026","provider_name":"Hatena Blog","width":"100%","height":"190","provider_url":"https://hatena.blog"}