{"title":"ruby\u3067\u9b54\u65b9\u9663","provider_name":"Hatena Blog","published":"2008-12-06 15:47:16","description":"\u3053\u306e\u5b9f\u52b9\u901f\u5ea6\u306b\u51f9\u3093\u3060\u3002 15\u3063\u3066\u5206\u304b\u3063\u3066\u3084\u3063\u3066\u308b\u304b\u3089\u304b\u306a\uff1f \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3082\u304b\u306a\u308a\u7df4\u3063\u3066\u308b\u304b\u3089\u306a\u3041\u3002 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u8003\u3048\u308b\u6642\u9593\u3068\u5b9f\u884c\u3059\u308b\u6642\u9593\u3092\u8003\u3048\u308b\u3068\u3088\u308a\u8868\u73fe\u529b\u306e\u3042\u308b\u8a00\u8a9e\u306e\u65b9\u304c\u3044\u3044\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002 \u3044\u3084\u30fc\u3084\u3063\u3071\u308a\u30de\u30b7\u30f3\u901f\u304f\u306a\u3063\u305f\u306a\u3041\u3002ruby\u306f1.8.7\u4ee5\u4e0a\u3067\u306a\u3044\u3068permutation\u304c\u4f7f\u3048\u306a\u3044\u3002 x=15 (1..9).to_a.permutation(3).each{|a| if x==a.inject(0){|i,v|v+=i} (1..9).to_a.reject{|i|a.include?(i)}.permutation(3).each{|b| if x==b.inject(0){|\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fn9d.hatenadiary.org%2Fentry%2F20081206%2F1228546036\" title=\"ruby\u3067\u9b54\u65b9\u9663 - \u8a08\u7b97\u6a5f\u3068\u622f\u308c\u308b\u65e5\u3005\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u8a08\u7b97\u6a5f\u3068\u622f\u308c\u308b\u65e5\u3005","categories":[],"blog_url":"https://n9d.hatenadiary.org/","version":"1.0","type":"rich","image_url":null,"provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/n9d/","height":"190","width":"100%","url":"https://n9d.hatenadiary.org/entry/20081206/1228546036","author_name":"n9d"}