{"image_url":null,"height":"190","width":"100%","published":"2011-05-06 00:00:00","description":"\u3055\u3066\u3001Problem 1\u304b\u3089\u89e3\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u304b\u3002Problem 1\u3053\u306e\u554f\u984c\u306e\u6700\u3082\u7c21\u5358\u306a\u89e3\u304d\u65b9\u306f\u3001\u30aa\u30a4\u30e9\u30fc\u56f3\u3092\u63cf\u304f\u3053\u3068\u3067\u3059\u3002\u30aa\u30a4\u30e9\u30fc\u56f3\u306f\u3053\u3053\u3067\u306f\u30d9\u30f3\u56f3\u3068\u540c\u3058\u3088\u3046\u3067\u3059\u3002\u3059\u306a\u308f\u3061\u30013\u306e\u500d\u6570\u306e\u548c\u30685\u306e\u500d\u6570\u306e\u548c\u3092\u8db3\u3057\u3066\u3001\u305d\u3053\u304b\u3089\u91cd\u306a\u308b\u90e8\u5206\u306e15\u306e\u500d\u6570\u306e\u548c\u3092\u5f15\u304f\u3053\u3068\u3067\u3059\u3002\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002 def sum_multiple(m :Int, N :Int) = { val n = (N - 1) / m m * n * (n + 1) / 2 } val N = 1000 println (sum_multiple(3, N) + sum_multiple(5, N) - sum_multiple\u2026","categories":["Scala"],"blog_url":"https://inamori.hateblo.jp/","author_name":"inamori","url":"https://inamori.hateblo.jp/entry/20110506/p1","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20110506%2Fp1\" title=\"Scala\u3067Project Euler\uff082\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>","version":"1.0","type":"rich","blog_title":"inamori\u2019s diary","title":"Scala\u3067Project Euler\uff082\uff09","author_url":"https://blog.hatena.ne.jp/inamori/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog"}