Problem 37 Solution, ~3.151 second Execution Time