{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20110823%2Fp1\" title=\"Scala\u3067Project Euler\uff0875\uff09 - 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>","published":"2011-08-23 00:00:00","url":"https://inamori.hateblo.jp/entry/20110823/p1","image_url":null,"type":"rich","description":"Problem 45\u4e09\u89d2\u6570\u306f\u516d\u89d2\u6570\u3092\u542b\u3080\u306e\u3067\u3001\u4e09\u89d2\u6570\u306f\u8003\u3048\u306a\u304f\u3066\u3082\u3088\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u5358\u306b\u4e94\u89d2\u6570\u3068\u516d\u89d2\u6570\u3092\u6607\u9806\u306b\u4e26\u3079\u3066\u30de\u30fc\u30b8\u6cd5\u3092\u4f7f\u3046\u306e\u304c\u7c21\u5358\u3067\u3057\u3087\u3046\u3002 // Polygonal number def P(p :Int) :Stream[Long] = Stream.from(1).map(n => n * ((p - 2L) * n - p + 4) / 2) def coincident(s1 :Stream[Long], s2 :Stream[Long]) :Stream[Long] = (s1, s2) match { case (h1 #:: t1, h2 #:: t2) if h1\u2026","width":"100%","title":"Scala\u3067Project Euler\uff0875\uff09","provider_name":"Hatena Blog","blog_title":"inamori\u2019s diary","author_url":"https://blog.hatena.ne.jp/inamori/","version":"1.0","provider_url":"https://hatena.blog","blog_url":"https://inamori.hateblo.jp/","categories":["Scala"],"author_name":"inamori","height":"190"}