Completed Project Euler problem 35 with a ~1.7s runtime