Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

47 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f49f1000cf542c50ffb1
title: 问题306纸条游戏
challengeType: 5
videoUrl: ''
dashedName: problem-306-paper-strip-game
---
# --description--
以下游戏是组合博弈论的经典示例:
两名玩家从n个白色方块开始轮流交替进行。 在每个回合中,玩家选择两个连续的白色方块并将其涂成黑色。 第一个无法移动的玩家输了。
如果n = 1则没有有效的移动因此第一个玩家会自动失败。 如果n = 2则只有一招有效此后第二名玩家输了。 如果n = 3则有两个有效的举动但都留下第二个玩家输掉的情况。 如果n = 4则第一个玩家有3个有效动作她可以通过绘制两个中间方块来赢得比赛。 如果n = 5则第一个玩家有四次有效移动下面以红色显示但无论她做什么第二名玩家蓝色都会获胜。
因此对于1≤n≤5有3个n值第一位玩家可以对其施加强制胜利。 类似地对于1≤n≤50第一个玩家可以强制取胜的n值为40。
对于1≤n≤1 000 000第一个玩家可以强制赢得多少n值
# --hints--
`euler306()`应该返回852938。
```js
assert.strictEqual(euler306(), 852938);
```
# --seed--
## --seed-contents--
```js
function euler306() {
return true;
}
euler306();
```
# --solutions--
```js
// solution required
```