Project Euler, Problem 39 AC.