{"description":"13195 \u306e\u7d20\u56e0\u6570\u306f 5\u30017\u300113\u300129 \u3067\u3042\u308b\u3002 600851475143 \u306e\u7d20\u56e0\u6570\u306e\u3046\u3061\u6700\u5927\u306e\u3082\u306e\u3092\u6c42\u3081\u3088\u3002 Problem 3 - PukiWiki \u51e6\u7406\u304c\u91cd\u3059\u304e\u3066600851475143\u3067\u306f\u9014\u4e2d\u3067\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u6a21\u69d8\u3002\u5f53\u305f\u308a\u524d\u3060\u3088\u306d\u3048\u3002 limit =13195 max = 0 (2..limit).each{|i| if limit%i == 0 then k = 0 (2..(i/2).to_i).each{|j| k = 1 and break if i%j == 0 } max = i if k == 0 end } p max \u7b54\u3048\uff1a29 \u305d\u308c\u306a\u3089\u3070\u8a08\u7b97\u91cf\u3092\u5c0f\u3055\u304f\u3057\u3066\u307f\u308b\u3002\u7d04\u2026","height":"190","provider_url":"https://hatena.blog","version":"1.0","image_url":null,"published":"2008-08-20 00:00:03","title":"Problem 3","blog_title":"\u6bdb\u306e\u306f\u3048\u305f\u3088\u3046\u306a\u3082\u306e","url":"https://gomi-box.hatenablog.com/entry/20080820/PE_P3","blog_url":"https://gomi-box.hatenablog.com/","author_name":"gomi-box","type":"rich","width":"100%","categories":["Ruby","ProjectEuler"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgomi-box.hatenablog.com%2Fentry%2F20080820%2FPE_P3\" title=\"Problem 3 - \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>","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/gomi-box/"}