puzzle_6.apl (216B)
1 #! /usr/bin/apl --script 2 3 input← i⍴⍨↑⍴⍉ i← ⊃ ⍎⎕FIO[49] 'files/6.txt' 4 5 s← {+/⍵ = input} ¨ 1-⍨⍳9 6 r← {((6/0),(↑⍵ ),2/0) + 1⌽ ⍵ } 7 +/r⍣80 s ⍝ part 1 8 +/r⍣256 s ⍝ part 2 9 10 )OFF
adventofcodehttps://adventofcode.com/ | |
| Log | Files | Refs |