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

1.4 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f54a1000cf542c51005c 问题477数字序列游戏 5 problem-477-number-sequence-game

--description--

数字序列游戏以写在一行上的N个数字的序列S开始。两名球员交替轮流。在轮到他时玩家必须选择并删除序列中剩余的第一个或最后一个数字。球员得分是他所取得的所有数字的总和。每个玩家都试图最大化自己的总和。如果N = 4并且S = {1,2,10,3}则每个玩家最大化他的得分如下玩家1移除第一个数字1玩家2从剩余序列移除最后一个数字3玩家1从剩余序列中移除最后一个号码10玩家2移除剩余号码2玩家1得分为1 + 10 = 11.如果两个玩家都遵循则FN为玩家1的得分序列的最优策略S = {s1s2...sN}定义为s1 = 0 si + 1 =si2 + 45modulo 1 000 000 007序列以S = {0,45,2070开头4284945,753524550,478107844,894218625...}。给出F2= 45F4= 4284990F100= 26365463243F104= 2495838522951。求F108

--hints--

euler477()应该返回25044905874565164。

assert.strictEqual(euler477(), 25044905874565164);

--seed--

--seed-contents--

function euler477() {

  return true;
}

euler477();

--solutions--

// solution required