stones stones and move in turns, the first player going first.
The opening move must take exactly 10 stones. Every later move takes exactly one stone fewer than the opponent's previous move: 10, then 9, then 8, and so on.
Whoever cannot take the required number of stones loses. Return True if the first player wins and False otherwise.stones=15 → True
The first player takes 10, leaving 5. The second player must take 9 and cannot, so they lose.
stones=19 → False
The first player takes 10, the second takes 9 and the pile is empty. The first player now needs 8 stones and has none, so they lose.
stones=7 → False
There are not even enough stones for the very first move.
stones ≤ 50stones=15
True
Run checks the first 3 tests in your browser. Submit checks all 32 tests on the server, hidden ones included.