{"url":"https://gomi-box.hatenablog.com/entry/20080825/PE_P15","author_name":"gomi-box","blog_url":"https://gomi-box.hatenablog.com/","height":"190","title":"Problem 15","description":"2 \u00d7 2 \u306e\u30de\u30b9\u76ee\u306e\u5de6\u4e0a\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3057\u305f\u5834\u5408\u3001\u5f15\u304d\u8fd4\u3057\u306a\u3057\u3067\u53f3\u4e0b\u306b\u3044\u304f\u30eb\u30fc\u30c8\u306f 6 \u3064\u3042\u308b\u3002 \u3067\u306f\u300120 \u00d7 20 \u306e\u30de\u30b9\u76ee\u3067\u306f\u3044\u304f\u3064\u306e\u30eb\u30fc\u30c8\u304c\u3042\u308b\u304b\u3002 Problem 15 - PukiWiki \u3053\u308a\u3083\u9ad8\u6821\u6570\u5b66\u3060\u306a\u3002\uff08\u3053\u308c\u3068\u304b\u3002\uff09 def fact(n) return 1 if n ==1 or n ==0 ans =1 (2..n).each{|i| ans = ans*i} return ans end w = h =20 p (fact(w+h)/fact(h)/fact(w)).to_i \u7b54\u3048\uff1a137846528820","provider_url":"https://hatena.blog","published":"2008-08-25 18:06:21","author_url":"https://blog.hatena.ne.jp/gomi-box/","image_url":null,"blog_title":"\u6bdb\u306e\u306f\u3048\u305f\u3088\u3046\u306a\u3082\u306e","width":"100%","version":"1.0","provider_name":"Hatena Blog","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgomi-box.hatenablog.com%2Fentry%2F20080825%2FPE_P15\" title=\"Problem 15 - \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>","categories":["Ruby","ProjectEuler"]}