1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 19:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part3

This commit is contained in:
2022-03-27 20:46:41 +08:00
parent 6dafca13c5
commit dfacb20d31
1385 changed files with 115239 additions and 3 deletions

View File

@@ -0,0 +1,41 @@
<p>爱丽丝和鲍勃一起玩游戏,他们轮流行动。爱丽丝先手开局。</p>
<p>最初,黑板上有一个数字&nbsp;<code>n</code>&nbsp;。在每个玩家的回合,玩家需要执行以下操作:</p>
<ul>
<li>选出任一&nbsp;<code>x</code>,满足&nbsp;<code>0 &lt; x &lt; n</code>&nbsp;&nbsp;<code>n % x == 0</code>&nbsp;</li>
<li><code>n - x</code>&nbsp;替换黑板上的数字&nbsp;<code>n</code></li>
</ul>
<p>如果玩家无法执行这些操作,就会输掉游戏。</p>
<p><em>只有在爱丽丝在游戏中取得胜利时才返回&nbsp;<code>true</code>&nbsp;。假设两个玩家都以最佳状态参与游戏。</em></p>
<p>&nbsp;</p>
<ol>
</ol>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>n = 2
<strong>输出:</strong>true
<strong>解释:</strong>爱丽丝选择 1鲍勃无法进行操作。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>n = 3
<strong>输出:</strong>false
<strong>解释:</strong>爱丽丝选择 1鲍勃也选择 1然后爱丽丝无法进行操作。
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= n &lt;= 1000</code></li>
</ul>