2010-06-01から1ヶ月間の記事一覧
http://projecteuler.net/index.php?section=problems&id=295 これは厄介そうに見える。明日考えようかな。 平方の定理について今思い出そうとしている時点でダメなんだろうなあ。 思い出してきたけど、やっぱり明日ゆっくり考えよう。
http://projecteuler.net/index.php?section=problems&id=45 この問題はほとんどProject Euler 37と同じです。 Haskellだと簡単に書けます。 polygonal p = [ div (n * ((p - 1) * n + 4 - p)) 2 | n <- [1..] ] coincident (p:ps) (q:qs) | p == q = p:(coi…
http://projecteuler.net/index.php?section=problems&id=44 真面目に因数分解すると速いです。
http://projecteuler.net/index.php?section=problems&id=43 戻り値の型の違いで、数字のリストから数にする関数を2パターン書いているのですが、一つにまとまらないのでしょうか。
http://projecteuler.net/index.php?section=problems&id=42 let read_names (file : string) =は、 let read_names file =ではなぜか動きません。