Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-358-cyclic-numbers.md
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.2 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f4d21000cf542c50ffe5 问题358循环数 5 problem-358-cyclic-numbers

--description--

具有n位数字的循环数具有一个非常有趣的属性

当乘以1、2、3、4... n时所有乘积都具有完全相同的数字并且顺序相同但是以循环方式旋转

最小的循环数是6位数字142857 142857×1 = 142857 142857×2 = 285714 142857×3 = 428571 142857×4 = 571428 142857×5 = 714285 142857×6 = 857142

下一个循环号是16位数字0588235294117647 0588235294117647×1 = 0588235294117647 0588235294117647×2 = 1176470588235294 0588235294117647×3 = 1764705882352941 ... 0588235294117647×16 = 9411764705882352

请注意,对于循环数,前导零很重要。

只有一个循环数其最左边的11个数字为00000000137最右边的5个数字为56789即其形式为00000000137 ... 56789中间是未知数字。 查找所有数字的总和。

--hints--

euler358()应返回3284144505。

assert.strictEqual(euler358(), 3284144505);

--seed--

--seed-contents--

function euler358() {

  return true;
}

euler358();

--solutions--

// solution required