Long stairs: Difference between revisions

added RPL
(Added Dart)
(added RPL)
 
Line 1,407:
609 2187 958
Average seconds: 2716.0197, Average steps: 13677.143</pre>
 
=={{header|RPL}}==
« 0 (100,100)
'''DO''' SWAP 1 +
SWAP 1 -
1 5 '''START'''
RAND OVER RE LASTARG IM / <
1 R→C +
'''NEXT'''
'''IF''' OVER 599 > 3 PICK 610 < AND '''THEN''' OVER 1 DISP DUP 2 DISP '''END'''
'''UNTIL''' DUP RE NOT '''END'''
IM "steps" →TAG SWAP "secs" →TAG
» '<span style="color:blue">STAIRS</span>' STO
{{out}}
<pre>
2: steps:16135
1: secs:3207
</pre>
Executing 10,000 tests is far beyond the computing power of a basic calculator.
 
=={{header|V (Vlang)}}==
1,150

edits