Problem 36 Solution, ~4 second time