# 1025. Divisor Game

![](https://4272748102-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LekNH5IywF8mjBxFcnu%2F-MkD5DS1nMWWWHGM3OoL%2F-MkD5HwJSxltHZPUypfp%2Fimage.png?alt=media\&token=7ac902b3-0c4b-4904-8ff6-b2eddce4291d)

![](https://4272748102-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LekNH5IywF8mjBxFcnu%2F-MkD5DS1nMWWWHGM3OoL%2F-MkD5KMur0J_3YvM2Cb7%2Fimage.png?alt=media\&token=53978e1a-5f7f-40cc-b1e6-cdf5f8a7ac2b)

time: O(1)

space:O(1)

```java
class Solution {
    public boolean divisorGame(int n) {
        return n%2 == 0;
    }
}

//alice first, n-x, n%x==0

/*
n=2, 

n=4
4 3 2 1
1 1 1 1
1 
*/
```

