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.0 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f4761000cf542c50ff88 问题265二进制圆圈 5 problem-265-binary-circles

--description--

2N二进制数字可以放在一个圆圈中这样所有N位顺时针子序列都是不同的。

对于N = 3两个这样的圆形布置是可能的忽略旋转

对于第一种布置顺时针顺序的3位子序列是000,001,010,101,011,111,110和100。

通过将以全零的子序列开始的二进制数字连接为最高有效位并顺时针进行可以将每个循环排列编码为数字。因此N = 3的两种排列表示为23和2900010111 2 = 23 00011101 2 = 29

调用SN唯一数值表示的总和我们可以看到S3= 23 + 29 = 52。

找到S5

--hints--

euler265()应该返回209110240768。

assert.strictEqual(euler265(), 209110240768);

--seed--

--seed-contents--

function euler265() {

  return true;
}

euler265();

--solutions--

// solution required