Skip to content

Commit

Permalink
Refactor solution
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Oct 2, 2024
1 parent 6cf7181 commit 1cfeb62
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions solutions/beecrowd/1061/1061.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@

(defn main []
(loop [line (read-line)]
(let [[_ initial-day] (str/split line #" ")
initial-day (Integer/parseInt initial-day)
(let [[initial-day] (->> (str/split line #" ")
(take-last 1)
(map #(Integer/parseInt %)))
[initial-hour initial-minute initial-second] (->> (str/split (read-line) #" : ")
(map #(Integer/parseInt %)))
[_ final-day] (str/split (read-line) #" ")
final-day (Integer/parseInt final-day)
[final-day] (->> (str/split (read-line) #" ")
(take-last 1)
(map #(Integer/parseInt %)))
[final-hour final-minute final-second] (->> (str/split (read-line) #" : ")
(map #(Integer/parseInt %)))
next-line (read-line)]
Expand Down

0 comments on commit 1cfeb62

Please sign in to comment.