Watch
1
0
Fork
You've already forked advent-of-code
0

2025 Day 2 Part 1

This commit is contained in:
Jeremy Kaplan 2025-12-09 17:02:14 -06:00
commit 81cb656a7f

33
2025/day02.ua Normal file
View file

@ -0,0 +1,33 @@
~ "aoc.ua" ~ Lines
Input ← (
&fras "input/day02.txt"
°□ ⊢Lines
⊜□ ⊸≠ @,
)
ParseRange ← (
⊜□ ⊸≠ @,
⍚(⊂∩⋕°$"_-_")
°□⊢
)
Seq ← + ⊙⇡ ⟜(+1-)
Log ← ⌝˜ⁿ
NumDigits ← +1 ⌊ Log10
RepeatDigits ← (
⊸(˜ⁿ10 ÷2NumDigits)
=⊃(⌊÷|◿)
)
ValidId ← (
⊸(◿2 NumDigits)
⨬(¬RepeatDigits|1)
)
⍚ParseRange Input
≡(
♭Seq°⊂°□
▽¬ ⊸ValidId
/+
)
/+