Initial commit
This commit is contained in:
commit
f242d2b0df
420 changed files with 62521 additions and 0 deletions
7
2022/day01/day01.bqn
Normal file
7
2022/day01/day01.bqn
Normal file
|
@ -0,0 +1,7 @@
|
|||
P←(10⊸×⊸+˜´∘⌽0∾-⟜'0') # string->number, 0 for empty string
|
||||
i←P¨¨(+`0=≠¨)⊸⊔•FLines"input" # parse input as list of lists
|
||||
# Alternative version, with bqn-libs
|
||||
#str ← •Import"../bqn-libs/strings.bqn"
|
||||
#i ← str.ToNats¨ (2⥊@+10) str.Split •FChars"input"
|
||||
•Show ⌈´+´¨i # part 1
|
||||
•Show +´3↑∨+´¨i # part 2
|
Loading…
Add table
Add a link
Reference in a new issue