当前位置:网站首页>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
边栏推荐
- 第六次实验
- WeChat applet wx.writeBLECharacteristicValue Chinese character to buffer problem
- error in ./node_modules/cesium/Source/ThirdParty/zip.js
- 基于 .NET Core MVC 的权限管理系统
- LeetCode 剑指offer 21.调整数组顺序使奇数位于偶数前面(简单)
- Canal reports Could not find first log file name in binary log index file
- The Principle of Union Search and API Design
- 数据库 笔记 创建数据库、表 备份
- Using sqlplus to operate database in shell script
- Linux数据库Oracle客户端安装,用于shell脚本用sqlplus连接数据库
猜你喜欢
随机推荐
impdp import data
Content related to ZigBee network devices
shell脚本中利用sqlplus操作数据库
I use this recruit let the team to improve the development efficiency of 100%!
最新最全的数字藏品发售日历-07.26
Collection工具类
数据库 笔记 创建数据库、表 备份
【笔记】集合框架体系 Collection
The Principle of Union Search and API Design
[Difference between el and template]
Chain Reading|The latest and most complete digital collection sales calendar-08.02
Day1 微信小程序-小程序代码的构成
A timeout error is reported when connecting to Nacos
力扣——情侣牵手
【List练习】遍历集合并且按照价格从低到高排序,
并查集原理与API设计
链读精选:星巴克着眼于数字收藏品并更好地吸引客户
Index Notes【】【】
力扣——统计只差一个字符的子串数目
el-dropdown drop-down menu style modification, remove the small triangle









