DL
the bindings of the recursion point to the values of the exprs.
Execution then jumps back to the recursion point, a loop or fn method.
Size: a a a
DL
n
DL
n
DL
n
DL
n
n
n
T
(defn foo [x & xs]
(prn x)
(prn xs))
(foo 1 2 3 4 5)
;=> 1
;=> [2 3 4 5]
n
ST
; Complete the countTriplets function below.
(defn countTriplets [arr r]
)
(def fptr (get (System/getenv) "OUTPUT_PATH"))
(def nr (clojure.string/split (clojure.string/trimr (read-line)) #" "))
(def n (Integer/parseInt (nth nr 0)))
(def r (Long/parseLong (nth nr 1)))
(def arr (vec (map #(Long/parseLong %) (clojure.string/split (clojure.string/trimr (read-line)) #" "))))
(def ans (countTriplets arr r))
(spit fptr (str ans "\n") :append true)
DL
; Complete the countTriplets function below.
(defn countTriplets [arr r]
)
(def fptr (get (System/getenv) "OUTPUT_PATH"))
(def nr (clojure.string/split (clojure.string/trimr (read-line)) #" "))
(def n (Integer/parseInt (nth nr 0)))
(def r (Long/parseLong (nth nr 1)))
(def arr (vec (map #(Long/parseLong %) (clojure.string/split (clojure.string/trimr (read-line)) #" "))))
(def ans (countTriplets arr r))
(spit fptr (str ans "\n") :append true)
DL
PP
; Complete the countTriplets function below.
(defn countTriplets [arr r]
)
(def fptr (get (System/getenv) "OUTPUT_PATH"))
(def nr (clojure.string/split (clojure.string/trimr (read-line)) #" "))
(def n (Integer/parseInt (nth nr 0)))
(def r (Long/parseLong (nth nr 1)))
(def arr (vec (map #(Long/parseLong %) (clojure.string/split (clojure.string/trimr (read-line)) #" "))))
(def ans (countTriplets arr r))
(spit fptr (str ans "\n") :append true)
A
VL
VL