{"version":"1.0","image_url":null,"published":"2011-05-30 00:00:00","description":"Problem 10\u3053\u306e\u554f\u984c\u306f\u30a8\u30e9\u30c8\u30b9\u30c6\u30cd\u30b9\u306e\u3075\u308b\u3044\u3067\u3059\u306d\u3002Scala\u3067\u306fArray\u3092\u4f7f\u3046\u3068\u3088\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u914d\u5217\u3067\u3059\u306d\u3002 val a = new Array[Int](5) for(i <- 0 to 4) a(i) = i + 1 println (a(1)) // 2 println (a.toList) // List(1, 2, 3, 4, 5) []\u306e\u4ee3\u308f\u308a\u306b()\u3092\u4f7f\u3046\u304f\u3089\u3044\u3067\u3059\u306d\u3002\u7c21\u5358\u3067\u3059\u3002 def sieve(N :Int) = { val a = new Array[Boolean](N) for(n <- 2 to (N - 1)) a(n) = true for(p <- \u2026","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20110530%2Fp1\" title=\"Scala\u3067Project Euler\uff0818\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>","categories":["Scala"],"blog_title":"inamori\u2019s diary","url":"https://inamori.hateblo.jp/entry/20110530/p1","author_url":"https://blog.hatena.ne.jp/inamori/","height":"190","blog_url":"https://inamori.hateblo.jp/","title":"Scala\u3067Project Euler\uff0818\uff09","type":"rich","author_name":"inamori","width":"100%","provider_name":"Hatena Blog"}