Finished Euler Problem 10