Problem 9 solution added. ~0.035 seconds running time.