Completed Project Euler problem 35 with a ~1.7 runtime.