Initial commit
This commit is contained in:
commit
f242d2b0df
420 changed files with 62521 additions and 0 deletions
17
2023/day06/day06.bqn
Normal file
17
2023/day06/day06.bqn
Normal file
|
@ -0,0 +1,17 @@
|
|||
⟨Split⟩←•Import"../bqn-libs/strings.bqn"
|
||||
|
||||
input←(0<≠)¨⊸/¨" "⊸Split¨10↓¨•FLines"input"
|
||||
|
||||
Times←{𝕊t‿d:
|
||||
a‿b←2÷˜+t(-∾+)√(t×t)-4×d
|
||||
a‿b↩⟨⌈a,⌊b⟩
|
||||
a+↩d=a×t-a
|
||||
b-↩d=b×t-b
|
||||
a‿b
|
||||
}
|
||||
|
||||
input1←⍉>•ParseFloat¨¨input
|
||||
•Show ×´1+|-´˘Times˘input1
|
||||
|
||||
input2←•ParseFloat¨∾¨input
|
||||
•Show 1+|-´Times input2
|
2
2023/day06/input
Normal file
2
2023/day06/input
Normal file
|
@ -0,0 +1,2 @@
|
|||
Time: 56 97 78 75
|
||||
Distance: 546 1927 1131 1139
|
2
2023/day06/test
Normal file
2
2023/day06/test
Normal file
|
@ -0,0 +1,2 @@
|
|||
Time: 7 15 30
|
||||
Distance: 9 40 200
|
Loading…
Add table
Add a link
Reference in a new issue