Project Euler 372(3)

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

微妙に合わないなあ。時間的には問題ないんだが。