Solution for google code jam problem Store Credit in clojure