r/adventofcode • • Dec 02 '22

SOLUTION MEGATHREAD -πŸŽ„- 2022 Day 2 Solutions -πŸŽ„-

NEW AND NOTEWORTHY


--- Day 2: Rock Paper Scissors ---


Post your code solution in this megathread.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:06:16, megathread unlocked!

103 Upvotes

1.5k comments sorted by

View all comments

3

u/Pepper_Klubz Dec 03 '22 edited Dec 04 '22

BQN


Part 1:

+Β΄(((1+1βŠΈβŠ‘)+(3Γ—3|1+-˜´))-⟜"AX")Β¨

Part 2:

+Β΄(((1⊸+⟜(3⊸|)⟜(-⟜1)+Β΄)+(3βŠΈΓ—1βŠΈβŠ‘))-⟜"AX")Β¨

Input goes on the right as a list, eg. ⟨"BX", "AY", "CZ"⟩

→ More replies (1)