Project Euler 500

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

134着。
この問題は2のべき乗だから易しくなる。