You are viewing a single comment's thread. Return to all comments →
In clojure, using lazy sequences:
(let [testcases (Integer/parseInt (read-line))] (loop [n testcases] (let [input-str (read-line)] (println (apply str (map str (take-nth 2 (subs input-str 1)) (take-nth 2 input-str))))) (if (> n 0) (recur (- n 1)))))
String-o-Permute
You are viewing a single comment's thread. Return to all comments →
In clojure, using lazy sequences: