Solve problem 1 from phase 2

This commit is contained in:
Dimitri Lozeve 2020-05-09 18:06:51 +02:00
parent 78f1d367fb
commit 30eeae6fbb

View file

@ -14,6 +14,14 @@
⍝ 2020 APL Problem Solving Competition Phase II
⍝ Stub function for Problem 1, Task 1 - DiveScore
⍝ Put your code and comments below here
:If 7=≢scores
scores←scores[¯2↓2↓⍋scores]
:ElseIf 5=≢scores
scores←scores[¯1↓1↓⍋scores]
:Else
scores←scores
:EndIf
score←2(⍎⍕)dd×+/scores
∇ steps←{p}Steps fromTo