Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 467 Bytes

File metadata and controls

22 lines (16 loc) · 467 Bytes

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