Last active
August 29, 2015 14:09
-
-
Save marchdown/d1388e064570439a39fb to your computer and use it in GitHub Desktop.
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
; Read a number from STDIN | |
; Read that many lines of input from STDIN. Print output to STDOUT | |
(defn shashank [s] | |
(- (count s) (count (partition-by identity s)))) | |
(defn -main [] | |
(println "give me a number of lines followed by that | |
many lines") | |
(loop [t (Integer/parseInt (read-line))] | |
(when (pos? t) | |
(println (str (shashank (read-line)))) | |
(recur (dec t))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment