{"provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/gomi-box/","blog_title":"\u6bdb\u306e\u306f\u3048\u305f\u3088\u3046\u306a\u3082\u306e","blog_url":"https://gomi-box.hatenablog.com/","author_name":"gomi-box","categories":["Ruby","ProjectEuler"],"version":"1.0","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgomi-box.hatenablog.com%2Fentry%2F20080822%2FPE_P6\" title=\"Problem 6 - \u6bdb\u306e\u306f\u3048\u305f\u3088\u3046\u306a\u3082\u306e\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","url":"https://gomi-box.hatenablog.com/entry/20080822/PE_P6","image_url":null,"description":"\u6700\u521d\u306e10\u500b\u306e\u81ea\u7136\u6570\u306b\u3064\u3044\u3066\u3001\u305d\u306e\u548c\u306e\u4e8c\u4e57\u3068\u3001\u4e8c\u4e57\u6570\u306e\u548c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002 1\u00b2 + 2\u00b2 + ... + 10\u00b2 = 385 (1 + 2 + ... + 10)\u00b2 = 3025\u3053\u308c\u3089\u306e\u6570\u306e\u5dee\u306f 3025 - 385 = 2640 \u3068\u306a\u308b\u3002\u540c\u69d8\u306b\u3057\u3066\u3001\u6700\u521d\u306e100\u500b\u306e\u81ea\u7136\u6570\u306b\u3064\u3044\u3066\u548c\u306e\u4e8c\u4e57\u3068\u4e8c\u4e57\u306e\u548c\u306e\u5dee\u3092\u6c42\u3081\u3088\u3002 Problem 6 - PukiWiki ans =0 limit = 100 (1..(limit-1)).each{|i| ((i+1)..limit).each{|j| ans += i*j } } p (2*ans) \u7b54\u3048\uff1a25164150","title":"Problem 6","width":"100%","height":"190","published":"2008-08-22 00:00:00"}