{"version":"1.0","url":"https://jeneshicc.hatenadiary.org/entry/20081207/1228626012","type":"rich","title":"Problem 135","published":"2008-12-07 14:00:12","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","blog_url":"https://jeneshicc.hatenadiary.org/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081207%2F1228626012\" title=\"Problem 135 - \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>","image_url":null,"categories":["Project Euler","Haskell"],"width":"100%","description":"http://projecteuler.net/index.php?section=problems&id=135 \u307e\u305a\u3001\u30ca\u30a4\u30fc\u30d6\u306a\u65b9\u6cd5\u3002\u7d04\u6570\u3092\u6c42\u3081\u3066\u3001\u5229\u7528\u3002 import Data.List divisors n = (1,n):d n 2 where d x m | m^2 > x = [] | mod x m == 0 = (m,div x m):d x (m+1) | otherwise = d x (m+1) sol = filter((>0 ).fst).concatMap f.divisors where f (d1,d2) | mod (d1+d2) 4 /= 0 = [] |\u2026","author_url":"https://blog.hatena.ne.jp/jeneshicc/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","height":"190","author_name":"jeneshicc"}