Solved problem 14, in lisp. Not a particularly elegant solution, but hey this is the first thing I've ever written in lisp.