MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / Solution

Class Solution

Python/divisor-game.py:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4Time Complexity: O(N^2)
5'''
6class Solution:
7 def divisorGame(self, N: int) -> bool:
8 dp = [False]*(N+1)
9 for i in range(N+1):
10 for j in range(1,i):
11 if i%j==0 and dp[i-j]==False:
12 dp[i] = True
13 return dp[N]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected