2024 day 14
This commit is contained in:
parent
e479454d81
commit
998d695685
3 changed files with 522 additions and 0 deletions
10
2024/day14/day14.bqn
Normal file
10
2024/day14/day14.bqn
Normal file
|
@ -0,0 +1,10 @@
|
|||
Split←((⊢-˜+`׬)∘=⊔⊢)
|
||||
in←>•ParseFloat¨¨¨','⊸Split¨¨2⊸↓¨¨' '⊸Split¨•FLines"input"
|
||||
size←101‿103
|
||||
Step←{n𝕊p‿v: size|p+n×v}
|
||||
|
||||
p1←100 Step˘in
|
||||
•Show ×´/⁼⊐(size÷2)⊸<˘(∧´˘(⌊size÷2)⊸≠˘p1)/p1
|
||||
|
||||
•Show n←⊑⊐⟜1 ⍷⊸≡¨{𝕩Step˘in}¨↕10000
|
||||
•Out ∾1↓⥊(@+10)≍˘<˘⍉⊑⟜" #"¨+˝{1⊸+⌾(𝕩⊸⊑)size⥊0}˘n Step˘in
|
Loading…
Add table
Add a link
Reference in a new issue