fork download
  1. (require (quote [clojure.set :as s]))
  2. (require (quote [clojure.core.reducers :as r]))
  3. (require (quote [clojure.contrib.math :as m]))
  4. (def n [0, 3, 5, 6])
  5. (def a (concat n (map #(- 15 %) (reverse n))))
  6. (def b (s/difference (set (range 16)) (set a)))
  7. (defn | [x] (conj [] (apply str (interpose ", " x))))
  8. (println (| a) (| b))
  9. (doseq [p (range 0 4)]
  10. (def ai (r/fold + (map #(m/expt % p) a)))
  11. (def bi (r/fold + (map #(m/expt % p) b)))
  12. (printf "%5d%5d\n" ai, bi))
  13.  
Runtime error #stdin #stdout 1.9s 389120KB
stdin
Standard input is empty
stdout
Standard output is empty