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

Method divisorGame

Python/divisor-game.py:7–13  ·  view source on GitHub ↗
(self, N: int)

Source from the content-addressed store, hash-verified

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