Project Euler 326

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

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

265着。
この問題が出題されたときなにを悩んでいたかは今となってはわからない。