Easy25 pts
Cut the sticks
Array of lengths. Each turn: cut all by min, remove zeros. Output count remaining each turn until none.
Input
n, then n ints.
Output
One per turn: count before cutting.
Sample
6 5 4 4 2 2 8
Expected
6 4 2 1
Loading editor…
Output
No output yet. Run your code to see results.