当前位置:网站首页>LeetCode 292. Nim Game (Simple)
LeetCode 292. Nim Game (Simple)
2022-08-10 05:55:00 【Shengxin Research Ape】
python
class Solution:def canWinNim(self, n: int) -> bool:# If your opponent gives you 4 stones at the end, you must lose.#So the total number of stones cannot be a multiple of 4, otherwise no matter how many you take, you can control the number of stones to a multiple of 4 in the back hand.return n%4 != 0
边栏推荐
- Link reading good article: What is the difference between hot encrypted storage and cold encrypted storage?
- Timer (setInterval) on and off
- Batch add watermark to pictures batch add background zoom batch merge tool picUnionV4.0
- 数据库 笔记 创建数据库、表 备份
- opencv
- 一个基于.Net Core跨平台小程序考试系统
- LeetCode 94.二叉树的中序遍历(简单)
- LeetCode 2011.执行操作后的变量值(简单)
- 最新最全的数字藏品发售日历-07.27
- Collection工具类
猜你喜欢
随机推荐
GUI_AWT
MySql constraints
Chain Reading|The latest and most complete digital collection sales calendar-08.02
impdp import data
链读 | 最新最全的数字藏品发售日历-07.28
LeetCode 100.相同的树(简单)
cesium listens to map zoom or zoom to control whether the content added on the map is displayed
棋类游戏-五子棋小游戏
LeetCode 162. Finding Peaks (Moderate)
Database Notes Create Database, Table Backup
堆的原理与实现以及排序
Bifrost micro synchronous database implementation services across the library data synchronization
21天挑战杯MySQL-Day05
符号表
Linux数据库Oracle客户端安装,用于shell脚本用sqlplus连接数据库
A little knowledge point every day
Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus
开源免费WMS仓库管理系统【推荐】
pytorch-07.处理多维特征的输入
21天挑战杯MySQL——Day06