Project Euler 371

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

英語がよくわからないけど、これってためていくってこと?
できたと思ったがincorrect.
すでに17人正答。