mirror of
https://github.com/mx42/codingame.git
synced 2026-01-14 05:39:51 +01:00
Adding easy puzzles
This commit is contained in:
18
puzzles/easy/onboarding.clj
Normal file
18
puzzles/easy/onboarding.clj
Normal file
@@ -0,0 +1,18 @@
|
||||
; 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))
|
||||
)))
|
||||
Reference in New Issue
Block a user