Completed Project Euler problem 40 with a ~0.5s runtime