Project Euler 290(2)


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

昨日解法を思いついた。全然違う方向で考えていた。