当前位置:网站首页>LeetCode 292.Nim 游戏(简单)
LeetCode 292.Nim 游戏(简单)
2022-08-10 05:32:00 【生信研究猿】
python
class Solution:
def canWinNim(self, n: int) -> bool:
# 对手如果最后给你剩下4块石头,你必输。
#所以石头总数不能是4的倍数,否则不管你拿几个,后手都可以把石头数量控制在4的倍数。
return n%4 != 0
边栏推荐
猜你喜欢
随机推荐
Batch add watermark to pictures batch scale pictures to specified size
Consensus calculation and incentive mechanism
复杂的“元宇宙”,为您解读,链读APP即将上线!
开源免费WMS仓库管理系统【推荐】
作业实验四
Link reading good article: What is the difference between hot encrypted storage and cold encrypted storage?
wiki confluence installation
network security firewall
pytorch-07.处理多维特征的输入
集合 Map
A little knowledge point every day
Database Notes Create Database, Table Backup
链读推荐:从瓷砖到生成式 NFT
深度学习TensorFlow入门环境配置
力扣——统计只差一个字符的子串数目
Set Sources Resources and other folders in the IDEA project
Common class BigDecimal
[Notes] Collection Framework System Collection
去中心化和p2p网络以及中心化为核心的传统通信
LeetCode 面试题17.14 最小k个数(中等)








![[List Exercise] Traverse the collection and sort by price from low to high,](/img/49/183ebabf99e31af0d095bfd05a0b1f.png)
