From 9956d79332d9c8c0ab5a2e03a2afa8ea7ec8a7c4 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sat, 7 Dec 2024 21:20:51 -0800 Subject: [PATCH] [2024][uiua][7.x] --- 2024/uiua/day_07.ua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2024/uiua/day_07.ua 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