Solving Divisor Game in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Alice and Bob take turns playing a game, with Alice starting first.

Also, if a player cannot make a move, they lose the game.

Example 1:

Input: 2
Output: true
Explanation: Alice chooses 1, and Bob has no more moves.

Example 2:

Input: 3
Output: false
Explanation: Alice chooses 1, Bob chooses 1, and Alice has no more moves.


  1. 1 <= N <= 1000

See the full details of the problem Divisor Game at LeetCode

Originally posted at: