Skip to content

Instantly share code, notes, and snippets.

@spirinvladimir
Created April 9, 2018 03:05
Show Gist options
  • Save spirinvladimir/e5d2efb815fbd91359b0ae3568da8e10 to your computer and use it in GitHub Desktop.
Save spirinvladimir/e5d2efb815fbd91359b0ae3568da8e10 to your computer and use it in GitHub Desktop.
(let [n_ (Integer/parseInt (read-line))
i (fn [] (map #(Integer/parseInt %) (clojure.string/split (read-line) #" ")))
[x0 y0] (i)]
(loop [n n_
min_x x0
min_y y0]
(if (= n 1)
(println (* min_x min_y))
(let [[x y] (i)]
(recur
(dec n)
(min x min_x)
(min y min_y))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment