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

Project Euler 44

http://projecteuler.net/index.php?section=problems&id=44 まず、できるだけ数学を使わない方法で書いた。Plをlが小さいほうから調べ、Pkとの和が五角数であるものを探す。ただし、kはPk+1-Pk ≤ Plを満たす限り。その中でPl + 2Pkが五角数であるものを探す…

Project Euler 76

Problem 76 5は6つの違う方法で和に書ける。 4 + 1 3 + 2 3 + 1 + 1 2 + 2 + 1 2 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1 100を少なくとも2つの和に書く方法は何通りあるか。 http://projecteuler.net/index.php?section=problems&id=76 これは分割数と言われるもの…