* 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>
49 lines
1.0 KiB
Markdown
49 lines
1.0 KiB
Markdown
---
|
||
id: 5900f50d1000cf542c51001f
|
||
title: 问题417:倒数周期II
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-417-reciprocal-cycles-ii
|
||
---
|
||
|
||
# --description--
|
||
|
||
单位分数在分子中包含1。给出分母2到10的单位分数的十进制表示:
|
||
|
||
1/2 = 0.5 1/3 = 0.(3)1/4 = 0.25 1/5 = 0.2 1/6 = 0.1(6)1/7 = 0.(142857)1/8 = 0.125 1/9 = 0.(1)1/10 = 0.1
|
||
|
||
其中0.1(6)表示0.166666 ...,并具有1位循环周期。可以看出1/7具有6位循环周期。
|
||
|
||
分母没有其他素数因子而不是2和/或5的单位分数不被认为具有重复周期。我们将这些单位分数的重复周期的长度定义为0。
|
||
|
||
令L(n)表示1 / n的循环周期的长度。给出ΣL(n)3≤n≤1000 000等于55535191115。
|
||
|
||
找ΣL(n)为3≤n≤100000 000
|
||
|
||
# --hints--
|
||
|
||
`euler417()`应该返回446572970925740。
|
||
|
||
```js
|
||
assert.strictEqual(euler417(), 446572970925740);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler417() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler417();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|