{"url":"https://kazuph.hateblo.jp/entry/2012/09/01/205837","categories":[],"title":"ProjectEuler 003 \u6700\u5927\u306e\u7d20\u56e0\u6570","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkazuph.hateblo.jp%2Fentry%2F2012%2F09%2F01%2F205837\" title=\"ProjectEuler 003 \u6700\u5927\u306e\u7d20\u56e0\u6570 - \u50d5\u306eYak Shaving\u306f\u7d42\u308f\u3089\u306a\u3044\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u554f\u984c\u6587 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 \u3055\u3063\u305d\u304f\u30b3\u30fc\u30c9\uff11 # \u7d20\u56e0\u6570\u5206\u89e3 def factorization (num) factor = [] # \u7d20\u6570\u3092\u751f\u6210\u3057\u3066\u9806\u306b\u5272\u3063\u3066\u3044\u304f (2..num).each do |prime| # \u7d20\u6570\u306e\u5224\u5b9a if !(2..Math.sqrt(prime)).any?{|n| prime % n == 0} # \u7d20\u6570\u3067\u5272\u308a\u5207\u308c\u305f\u3089\u8ffd\u52a0 factor << prime if num % prime == 0 # \u5272\u308a\u5207\u308c\u305f\u7d20\u6570\u306e\u7a4d\u304c\u5143\u306e\u6570\u306b\u7b49\u3057\u3044\u306a\u3089\u7d42\u4e86 if factor.\u2026","author_url":"https://blog.hatena.ne.jp/kazuph1986/","author_name":"kazuph1986","published":"2012-09-01 20:58:37","blog_url":"https://kazuph.hateblo.jp/","provider_url":"https://hatena.blog","image_url":null,"type":"rich","version":"1.0","width":"100%","blog_title":"\u50d5\u306eYak Shaving\u306f\u7d42\u308f\u3089\u306a\u3044","provider_name":"Hatena Blog","height":"190"}