2010-02-27から1日間の記事一覧

Project Euler 65,66

Problem 65 http://projecteuler.net/index.php?section=problems&id=65 連分数の計算法を適用する。最初に1を付加すると計算しやすい。 digits 0 = [] digits n = (mod n 10):(digits (div n 10)) a = 2:1:2:1:[ if n == 1 then 1 else n + 2 | n <- tail a…

Project Euler 280

プロジェクトオイラー http://projecteuler.net/index.php?section=problems&id=280 問題の意味を理解するのに5分。正しく理解したのかは不明。 the lower row, the upper rowの解釈に自信がない。 2×2マスの場合はできたと思うんだけど、それ以上はどうして…