morris555's diary

高校生のブログです。

2012-05-25から1日間の記事一覧

Problem 11

Ploblem 11はタテ・ヨコ・ナナメの4つの連続する数字の積で最大のものを求める問題です。 main = print . maximum $ width ++ height ++ obil1 ++ obil2 calc xs ys = product $ zipWith ref xs ys where ref x y = nums !! y !! x width = [calc [x + n | n…