From de3c367d1c4ab40312705c50f6964ae6aeab3a97 Mon Sep 17 00:00:00 2001 From: ajet Date: Thu, 27 Nov 2025 07:17:43 -1000 Subject: [PATCH] do 2015 day 5 pt1 --- 2015/src/day05.clj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 2015/src/day05.clj diff --git a/2015/src/day05.clj b/2015/src/day05.clj new file mode 100644 index 0000000..af04eee --- /dev/null +++ b/2015/src/day05.clj @@ -0,0 +1,14 @@ +(ns day05 + (:require [input-manager] + [clojure.string :as str])) + +(def input (input-manager/get-input 2015 5)) + +(def bad #{"ab" "cd" "pq" "xy"}) + +;; part 1 +(count (filter #(and (not (some (partial str/includes? %) bad)) + (>= (count (filter #{\a \e \i \o \u} %)) 3) + (some (partial apply =) (concat (partition 2 %) + (partition 2 (rest %))))) + input))