Skip to content

Latest commit

 

History

History

stone-removal-game

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Stone removal game

Problem link

Solutions

Solution.py

# https://leetcode.com/problems/stone-removal-game

class Solution:
    def canAliceWin(self, n: int) -> bool:
        for x in range(10, 0, -1):
            if x > n:
                return x % 2 == 1
            n -= x
        return False

Tags