Problem 27 solution added. ~0.65 seconds running time.