Project Euler 289

未解決問題を解こうシリーズ第7弾。

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

382着。
Problem 393とだいたい同じ。