Skip to content

Commit

Permalink
Solve Old Clock in clojujre
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 22, 2024
1 parent 67273c5 commit 7edd734
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions solutions/beecrowd/3084/3084.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(ns main
(:require [clojure.string :as str]))

(defn main []
(loop [line (read-line)]
(when line
(let [[hour-degree minute-degree] (map #(Integer/parseInt %) (str/split line #" "))]
(printf "%02d:%02d%n" (int (/ hour-degree 30)) (int (/ minute-degree 6))))
(recur (read-line)))))

(main)

0 comments on commit 7edd734

Please sign in to comment.