diff --git a/2025/day06.ua b/2025/day06.ua index f51e647..6697254 100644 --- a/2025/day06.ua +++ b/2025/day06.ua @@ -1,15 +1,40 @@ ~ "aoc.ua" ~ Lines Words -Lines &fras "input/day06.txt" -⍚Words -⍜↘₋₁ ⍚◇⋕ -≡°□ -⍉ -↻0_¯1 -≡( - ⍣(⍩(/×) °(⊂□"*") - | ⍩(/+) °(⊂□"+") +Input ← &fras "input/day06.txt" + +Part₁ ← ( + Lines + ⍚Words + ⍜↘₋₁ ⍚◇⋕ + ≡°□ + + ⍉ + ↻0_¯1 + ≡( + ⍣(⍩(/×) °(⊂□"*") + | ⍩(/+) °(⊂□"+") + ) + °□ ) - °□ + /+ ) -/+ + +Part₂ ← ( + Lines + ⬚@\s≡°□ + ⍉ + + ⊜□ ¬⊸≡(⧻ regex "^\\s+$") + ≡◇( + ⟜≡(⋕ ⊡ 0_0 regex "\\d+" ↘¯1) + ≡⊣ + ⊡ 0_0 regex "\\*|\\+" + ⍣(⍩(/×) °(□"*") + | ⍩(/+) °(□"+") + ) + ) + /+ +) + +Part₁ Input +Part₂ Input