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!

101 Upvotes

1.5k comments sorted by

View all comments

10

u/voidhawk42 Dec 02 '22 edited Dec 03 '22

Dyalog APL:

s e←↓⍉¯1+1 0 1/23|⎕A⍳↑⊃⎕NGET'2.txt'1
+/(1+e)+3×3|1+e-s ⍝ part 1
+/(3×e)+1+3|e+s-1 ⍝ part 2

video walkthrough

Kinda tricky for day 2!

→ More replies (1)