Solved Project Euler 005.