blob: 817c17d555146de3f4817252dfedf7548695c409 (
plain)
1
2
3
4
5
6
7
8
9
10
|
(defn find-marker [data n]
(->> data
(partition n 1)
(map #(apply distinct? %))
(take-while false?)
(#(+ n (count %)))))
(let [data (slurp "input")]
(doseq [ind [4 14]]
(println (find-marker data ind))))
|