这道题并不能显示出Python的强大,仅仅作为练手吧
class Solution(object): def canWinNim(self, n): """ :type n: int :rtype: bool """ # if the number can be divided by 4, first hand will lose anyway return n % 4 != 0;
LeetCode 292 Nim Game
原文:http://www.cnblogs.com/wenchan/p/5785499.html