Project Euler 325(4)

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


やっと正しい答えが出た。27着?
これはProject Euler史上最も美しい問題だと思う。