{"version":"1.0","author_url":"https://blog.hatena.ne.jp/jeneshicc/","url":"https://jeneshicc.hatenadiary.org/entry/20081225/1230187965","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081225%2F1230187965\" title=\"Problem 158 - \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>","published":"2008-12-25 15:52:45","title":"Problem 158","type":"rich","height":"190","categories":["Project Euler","Haskell"],"image_url":null,"description":"http://projecteuler.net/index.php?section=problems&id=158 \u7d44\u307f\u5408\u308f\u305b\u306e\u554f\u984c choose n r = div (product [n-r+1..n]) $ product [1..r] p m n = (2^n-(n+1))*choose m n main = print.maximum.map (p 26) $ [0..26] \u8981\u7d20\u6570m\u306e\u9806\u5e8f\u96c6\u5408\u304b\u3089n\u500b\u9078\u3073\u51fa\u3057\u3001\u964d\u9806\u306b\u4e26\u3079\u308b\u4e26\u3079\u65b9\u306fmCn. \u964d\u9806\u306b\u4e26\u3093\u3060\u4e2d\u304b\u3089\u3001\u90e8\u5206\u5217\u3092\u9069\u5f53\u306b\u629c\u304d\u53d6\u3063\u3066\u304b\u3089\u3001\u629c\u304d\u53d6\u3063\u305f\u5f8c\u306e\u5217\u306e\u524d\u306b\u304f\u3063\u3064\u3051\u308b\u3068 \u305d\u306e\u63a5\u5408\u7b87\u6240\u3067\u3001\u9806\u5e8f\u304c\u964d\u9806\u3067\u306f\u306a\u304f\u6607\u9806\u306b\u306a\u308b\u3002 \u90e8\u5206\u5217\u306e\u9078\u2026","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","author_name":"jeneshicc","blog_url":"https://jeneshicc.hatenadiary.org/","provider_url":"https://hatena.blog","width":"100%"}