mirror of
https://github.com/mx42/codingame.git
synced 2026-01-14 05:39:51 +01:00
19 lines
508 B
Clojure
19 lines
508 B
Clojure
; https://www.codingame.com/ide/puzzle/onboarding
|
|
; Xavier Morel - 2016-03-04
|
|
|
|
(ns Player
|
|
(:gen-class))
|
|
|
|
(defn -main [& args]
|
|
(while true
|
|
(let [enemy1 (read) dist1 (read) enemy2 (read) dist2 (read)]
|
|
; enemy1: name of enemy 1
|
|
; dist1: distance to enemy 1
|
|
; enemy2: name of enemy 2
|
|
; dist2: distance to enemy 2
|
|
|
|
; Enter the code here
|
|
|
|
(if (< dist1 dist2) (println enemy1) (println enemy2))
|
|
)))
|