{"type":"rich","author_url":"https://blog.hatena.ne.jp/jeneshicc/","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","provider_url":"https://hatena.blog","version":"1.0","categories":["Project Euler","Haskell"],"url":"https://jeneshicc.hatenadiary.org/entry/20081226/1230271460","height":"190","description":"http://projecteuler.net/index.php?section=problems&id=160 \u968e\u4e57\u306e\u975e\u96f6\u672b\u5c3e\u306e\u6570\u5b57\u3092k\u500b\u6c42\u3081\u308b\u3002 n!\u306b\u542b\u307e\u308c\u308b5\u306e\u6570\u3092p(n)\u3068\u3059\u308b\u3068 n!/10^p(n) mod (10^k) \u304c\u5206\u304b\u308c\u3070\u3088\u3044\u3002 \u307e\u305a\u3001n!/10^p(n) = 0 (mod 2^k) \u3067\u3042\u308b\u304b\u3089 n!/10^p(n) mod (5^k) \u3092\u6c42\u3081\u3066\u3001\u3042\u3068\u306f\u9023\u7acb\u5408\u540c\u5f0f x = 0 (mod 2^k), x = ? (mod 5^k) \u3092\u89e3\u3051\u3070\u3088\u3044\u3002 n!/5^p(n) mod (5^k) \u304b\u3089 n!/10^p(n) mod (5^k) \u3092\u6c42\u3081\u3066\u3044\u308b\u3002 import Data\u2026","title":"Problem 160 \uff08\u968e\u4e57\u306e\u975e\u96f6\u672b\u5c3e\u6570\u5b57)","published":"2008-12-26 15:04:20","image_url":null,"provider_name":"Hatena Blog","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081226%2F1230271460\" title=\"Problem 160 \uff08\u968e\u4e57\u306e\u975e\u96f6\u672b\u5c3e\u6570\u5b57) - \u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"jeneshicc","blog_url":"https://jeneshicc.hatenadiary.org/"}