Project Euler 501

http://projecteuler.net/index.php?section=problems&id=501

144着。
なんとか土曜日中にできた。
単に素数の個数を数えるだけの問題なのに。