{"blog_title":"\u6bdb\u306e\u306f\u3048\u305f\u3088\u3046\u306a\u3082\u306e","title":"Problem 11","url":"https://gomi-box.hatenablog.com/entry/20080824/PE_P11","height":"190","author_name":"gomi-box","provider_name":"Hatena Blog","type":"rich","blog_url":"https://gomi-box.hatenablog.com/","provider_url":"https://hatena.blog","version":"1.0","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgomi-box.hatenablog.com%2Fentry%2F20080824%2FPE_P11\" title=\"Problem 11 - \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>","published":"2008-08-24 00:00:00","image_url":null,"categories":["Ruby","ProjectEuler"],"author_url":"https://blog.hatena.ne.jp/gomi-box/","description":"\u4e0a\u306e 20 \u00d7 20 \u306e\u6570\u5b57\u306e\u306a\u304b\u3001\u8d64\u304f\u30de\u30fc\u30af\u3055\u308c\u305f\u6570\u5b57\u306e\u7a4d\u306f 26 \u00d7 63 \u00d7 78 \u00d7 14 = 1788696 \u3068\u306a\u308b\u3002 \u4e0a\u4e0b\u5de6\u53f3\u659c\u3081\u306e\u3044\u305a\u308c\u304b\u306e\u65b9\u5411\u3067\u9023\u7d9a\u3059\u308b4\u3064\u306e\u6570\u5b57\u306e\u7a4d\u306e\u3046\u3061\u6700\u5927\u306e\u3082\u306e\u3092\u6c42\u3081\u3088\u3002 Problem 11 - PukiWiki def horizontal_max(mat) ans = mat[0][0]*mat[0][1]*mat[0][2]*mat[0][3] (0..19).each{|j| (4..19).each{|i| if mat[j][i-4] < mat[j][i] tmp = mat[j][i-3]*mat[j][i-2]*mat[j][i-1]*\u2026"}