Created
August 12, 2015 04:47
-
-
Save uroybd/979a0f3a680f7e06eaa6 to your computer and use it in GitHub Desktop.
multiplse of 3 and 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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