Project Euler 409

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

30着。
ちゃんと考えればこれは易しい。実質8行。