Alice and Bob are playing a game with a pile of n stones, with Alice taking the first turn.
On each turn, a player must remove a specific number of stones from the pile:
On the first turn, the player must remove exactly
On each subsequent turn, the current player must remove exactly
The game ends when a player is unable to make a valid move because there are not enough stones left in the pile. That player loses the game.
Given the integer n, return true if Alice wins the game assuming both players play optimally, or false otherwise.
Constraints:
n
Alice and Bob are playing a game with a pile of n stones, with Alice taking the first turn.
On each turn, a player must remove a specific number of stones from the pile:
On the first turn, the player must remove exactly
On each subsequent turn, the current player must remove exactly
The game ends when a player is unable to make a valid move because there are not enough stones left in the pile. That player loses the game.
Given the integer n, return true if Alice wins the game assuming both players play optimally, or false otherwise.
Constraints:
n