Have you ever heard about LeetCode, TopCoder, HackerRank and similar platforms?
I have bad news - the most popular ones do not support Clojure π
Hopefully I have found 2 that do:
π CodeChef - I tried to solve some hello world problem and got TLE, people had similar experiences (link) -> I cannot recommend this platform.
π SPOJ - it worked for me with test problem like this one.
Below is solution if you are interested.
(defn read-int
[]
(let [l (read-line)]
(Integer/parseInt l)))
(defn main
[]
(let [n (read-int)]
(when (not (= n 42))
(println n)
(recur))))
(main)
Β