Solve problem 4 to Project Euler.