mirror of
https://github.com/seigler/rockstar-playground
synced 2025-07-27 09:46:09 +00:00
Day 3
This commit is contained in:
parent
135ab62a3f
commit
24e478d214
3 changed files with 407 additions and 0 deletions
37
contracts/2020-03.rock
Normal file
37
contracts/2020-03.rock
Normal file
|
@ -0,0 +1,37 @@
|
|||
Tree is "#"
|
||||
Space is " "
|
||||
Rock Input
|
||||
Listen to Line
|
||||
Until Line is gone
|
||||
Rock Input with Line
|
||||
Listen to Line
|
||||
(end until)
|
||||
Ride takes X
|
||||
Y is 1
|
||||
If X is 0
|
||||
Y is 2
|
||||
(end if)
|
||||
Trees are 0
|
||||
Row is 0
|
||||
Col is 0
|
||||
While Row is lower than Input
|
||||
Shatter Input at Row into Plots
|
||||
Let Width be Plots
|
||||
If Tree is Plots at Col
|
||||
Build Trees up
|
||||
(end if)
|
||||
Let Row be plus Y
|
||||
Let Col be plus X
|
||||
If Col is as high as Width
|
||||
Let Col be minus Width
|
||||
(end if)
|
||||
(end while)
|
||||
Give back Trees
|
||||
(end function)
|
||||
Say Ride taking 3
|
||||
Let Product be Ride taking 1
|
||||
Let Product be times Ride taking 3
|
||||
Let Product be times Ride taking 5
|
||||
Let Product be times Ride taking 7
|
||||
Let Product be times Ride taking 0
|
||||
Say Product
|
Loading…
Add table
Add a link
Reference in a new issue