Problem 9: added brute force solution in Clojure