* 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>
55 lines
1.4 KiB
Markdown
55 lines
1.4 KiB
Markdown
---
|
||
id: 5900f4c51000cf542c50ffd7
|
||
title: 问题344:银元游戏
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-344-silver-dollar-game
|
||
---
|
||
|
||
# --description--
|
||
|
||
NG de Bruijn的银元游戏的一个变种可以描述如下:
|
||
|
||
在正方形条上放置了许多硬币,每平方最多一枚硬币。只有一枚硬币,称为银元,具有任何价值。两名球员轮流做出动作。在每个回合中,玩家必须进行常规或特殊动作。
|
||
|
||
常规移动包括选择一个硬币并将其移动到左侧的一个或多个方块。硬币不能从条带中移出或跳到另一个硬币上或上方。
|
||
|
||
或者,玩家可以选择将最左边的硬币扒窃而不是定期移动。如果没有可能的常规动作,则玩家被迫掏出最左边的硬币。
|
||
|
||
获胜者是兜售银元的玩家。
|
||
|
||
获胜配置是在条带上的硬币排列,其中第一玩家可以强制获胜而不管第二玩家做什么。
|
||
|
||
设W(n,c)为n个正方形,c个无价值硬币和1个银元的获胜配置数。
|
||
|
||
给出W(10,2)= 324和W(100,10)= 1514704946113500。
|
||
|
||
找到W(1 000 000,100)模数半数1000 036 000 099(= 1 000 003·1 000 033)。
|
||
|
||
# --hints--
|
||
|
||
`euler344()`应该返回65579304332。
|
||
|
||
```js
|
||
assert.strictEqual(euler344(), 65579304332);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler344() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler344();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|