Skip to content

Commit

Permalink
day 22 part a uiua
Browse files Browse the repository at this point in the history
  • Loading branch information
KatieLG committed Dec 22, 2024
1 parent 40af71a commit aec7080
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AOC/python/solutions/day_22.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Day22(AOCSolution):
EXPECTED = {
"part_one": {"sample": 37327623, "data": 0},
"part_one": {"sample": 37327623, "data": 14726157693},
"part_two": {"sample": 0, "data": 0},
}

Expand Down
14 changes: 14 additions & 0 deletions AOC/uiua/solutions/day22.ua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
~ "../helpers/input.ua" ~ ReadInput ReadSample

Input ← (
ReadSample "day_22"
⊜⋕≠,@\n
)

Xor ← °⋯⬚0≠∩⋯ # bitwise or
Mp ← ◿16777216 Xor # Mix and prune
Process ← Mp⊸×₂₀₄₈Mp⌊⊸÷₃₂Mp⊸×₆₄ # Process a secret

# Part A
Input
/+⍥Process2000 # sum up after 2000 iterations of processing

0 comments on commit aec7080

Please sign in to comment.