Project Euler

Solution of problem 59.