diff options
Diffstat (limited to 'day05.clj')
-rw-r--r-- | day05.clj | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/day05.clj b/day05.clj new file mode 100644 index 0000000..f165d11 --- /dev/null +++ b/day05.clj @@ -0,0 +1,8 @@ +(def data + (->> (slurp "day05") + (clojure.string/split-lines) + (map (fn [x] (reduce #(+ (* 2 %1) %2) + (map {\F 0, \B 1, \L 0, \R 1} x)))))) + +(apply max data) ; => 818 +(apply min (remove (set data) (map inc data))) ; => 559 |