Project Euler 510

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

81着。
簡単だが、いろいろ計算ミスをしていた。