-
-
Save parcar/ed3067b0dd8ab568fa05628f353f55a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution(object): | |
| def canWinNim(self, n): | |
| """ | |
| :type n: int | |
| :rtype: bool | |
| """ | |
| return n % 4 | |
| ''' | |
| Runtime: 8 ms, faster than 96.34% of Python online submissions for Nim Game. | |
| Memory Usage: 11.5 MB, less than 100.00% of Python online submissions for Nim Game. | |
| ''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment