diff --git a/2024/uiua/day_07.ua b/2024/uiua/day_07.ua new file mode 100644 index 0000000..6ba327f --- /dev/null +++ b/2024/uiua/day_07.ua @@ -0,0 +1,24 @@ +# Experimental! + +$ 190: 10 19 +$ 3267: 81 40 27 +$ 83: 17 5 +$ 156: 15 6 +$ 7290: 6 8 6 15 +$ 161011: 16 10 13 +$ 192: 17 8 14 +$ 21037: 9 7 18 13 +$ 292: 11 6 16 20 +⊜(⋕⊙□ °$"_:_") ≠@\n . +Vals ← +≡⍚⊜⋕≠@ . +Vars ← + +Part₁ ← ≡⍚/(⊂⊃+×) +Concat ← +×ⁿ⊙10+1⌊ₙ₁₀, +Part₂ ← ≡⍚/(⊂⊂⊃⊃+×Concat) + +Solve ← /+≡(×⊙(/∨∈). ∩°□ °⊟) ⍉⊟ ≡□ Vals + +$Part₁ Solve Part₁ Vars +$Part₂ Solve Part₂ Vars