• + 0 comments

    compact clojure:

    (dotimes [t (read)]
      (let [n (read)]
        (println (/ (* n (- (* 3 n) 1))2))))