Skip to content

Commit 716a4f0

Browse files
refactor 1025
1 parent d7d122e commit 716a4f0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/main/java/com/fishercoder/solutions/_1025.java

-23
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1025. Divisor Game
5-
*
6-
* Alice and Bob take turns playing a game, with Alice starting first.
7-
* Initially, there is a number N on the chalkboard. On each player's turn, that player makes a move consisting of:
8-
* Choosing any x with 0 < x < N and N % x == 0.
9-
* Replacing the number N on the chalkboard with N - x.
10-
* Also, if a player cannot make a move, they lose the game.
11-
* Return True if and only if Alice wins the game, assuming both players play optimally.
12-
*
13-
* Example 1:
14-
* Input: 2
15-
* Output: true
16-
* Explanation: Alice chooses 1, and Bob has no more moves.
17-
*
18-
* Example 2:
19-
* Input: 3
20-
* Output: false
21-
* Explanation: Alice chooses 1, Bob chooses 1, and Alice has no more moves.
22-
*
23-
* Note:
24-
* 1 <= N <= 1000
25-
* */
263
public class _1025 {
274
public static class Solution1 {
285
public boolean divisorGame(int N) {

0 commit comments

Comments
 (0)