{"provider_name":"Hatena Blog","provider_url":"https://hatena.blog","type":"rich","author_url":"https://blog.hatena.ne.jp/inamori/","height":"190","blog_url":"https://inamori.hateblo.jp/","url":"https://inamori.hateblo.jp/entry/20111020/p1","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20111020%2Fp1\" title=\"Scala\u3067\u7d20\u6570\u5224\u5b9a\uff081\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>","title":"Scala\u3067\u7d20\u6570\u5224\u5b9a\uff081\uff09","width":"100%","categories":["\u6570\u5b66","\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0","Scala"],"version":"1.0","description":"Python\u3068\u540c\u3058\u3053\u3068\u3092\u3057\u307e\u3059\u3002 \u307e\u305a\u306f\u8a66\u3057\u5272\u308a\u304b\u3089\u3002 def is_prime1(n :Int) :Boolean = Iterator.from(2).takeWhile(p => p * p <= n).forall(p => n % p != 0) def make_primes(N :Int, is_prime :Int => Boolean) :List[Int] = Iterator.range(2, N + 1).filter(is_prime).toList def solve() = { val primes = make_primes(N, is_prime1) prin\u2026","blog_title":"inamori\u2019s diary","published":"2011-10-20 00:00:00","author_name":"inamori","image_url":null}