mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-11-27 10:22:43 -10:00
do 2015 day 5 pt1
This commit is contained in:
parent
171a4d285d
commit
de3c367d1c
14
2015/src/day05.clj
Normal file
14
2015/src/day05.clj
Normal file
@ -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))
|
||||
Loading…
x
Reference in New Issue
Block a user