Skip to content

Instantly share code, notes, and snippets.

@uroybd
Created August 12, 2015 04:47
Show Gist options
  • Save uroybd/979a0f3a680f7e06eaa6 to your computer and use it in GitHub Desktop.
Save uroybd/979a0f3a680f7e06eaa6 to your computer and use it in GitHub Desktop.
multiplse of 3 and 5
(defn bigboy [x]
(reduce + (distinct (concat (take-nth 3 (range x)) (take-nth 5 (range x))))))
(loop [start 1 end (Integer/parseInt (read-line))]
(when (<= start end)
(println (bigboy (Integer/parseInt (read-line))))
(recur (inc start) end)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment