{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20100212%2Fp2\" title=\"Project Euler 42 - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"http://projecteuler.net/index.php?section=problems&id=42 \u4e09\u89d2\u6570\u306e\u5224\u5b9a\u306f\u3001 (n2 + n) / 2 = m n2 + n - 2m = 0 n = (-1 + \u221a(1 + 8m)) / 2 \u3060\u304b\u3089\u30011 + 8m\u304c\u5e73\u65b9\u6570\u304b\u3069\u3046\u304b\u3002 sqrt\u304c\u4f7f\u3048\u308b\u304c\u3001sqrt\u306e\u5f15\u6570\u306f\u5b9f\u6570\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u3067\u578b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u6574\u6570\u578b\u304b\u3089\u5909\u63db\u3059\u308b\u306e\u306ffromIntegral\u3067\u3001\u9006\u306ffloor\u3067\u3088\u3044\u3002\u6574\u6570\u578b\u5168\u822c\u3067\u4f7f\u3048\u308b\u306e\u3067\u3001\u578b\u6307\u5b9a\u304c\u5fc5\u8981\u3002 int_sqrt :: Int -> Int int_sqrt n = floor (sqrt (fromInteg\u2026","author_url":"https://blog.hatena.ne.jp/inamori/","width":"100%","categories":["Haskell"],"image_url":null,"title":"Project Euler 42","blog_title":"inamori\u2019s diary","type":"rich","height":"190","provider_url":"https://hatena.blog","author_name":"inamori","blog_url":"https://inamori.hateblo.jp/","provider_name":"Hatena Blog","url":"https://inamori.hateblo.jp/entry/20100212/p2","published":"2010-02-12 00:00:01","version":"1.0"}