Finished Project Euler 31