fork download
  1. (ns spoxzad8.core
  2. (:gen-class))
  3.  
  4. (defn read-int
  5. []
  6. (let [s (read-line)]
  7. (read-string s))
  8. )
  9.  
  10. (defn pouringWater
  11. [a b c]
  12. (cond
  13. (or (= a c) (= b c)) 1
  14. (= c 0) 0
  15. (= (mod a b) 0) 44
  16. (= (mod c b) 0) (* (/ c b) 2)
  17. :else -1)
  18. )
  19.  
  20. (defn main
  21. []
  22. (def tests (read-int))
  23. (dotimes [n tests]
  24. (def a (read-int))
  25. (def b (read-int))
  26. (def c (read-int))
  27. (println (pouringWater a b c))
  28. )
  29. )
  30.  
Success #stdin #stdout 0.69s 335552KB
stdin
2
5
2
3
2
3
4
stdout
Standard output is empty