Project Euler 497

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

36着。
単純にハノイの塔を解くだけなのに時間がかかってしまった。