2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: 5900f50d1000cf542c51001f
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2020-10-01 17:54:21 +02:00
|
|
|
|
title: 问题417:倒数周期II
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
<section id="description">单位分数在分子中包含1。给出分母2到10的单位分数的十进制表示: <p> 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 </p><p>其中0.1(6)表示0.166666 ...,并具有1位循环周期。可以看出1/7具有6位循环周期。 </p><p>分母没有其他素数因子而不是2和/或5的单位分数不被认为具有重复周期。我们将这些单位分数的重复周期的长度定义为0。 </p><p>令L(n)表示1 / n的循环周期的长度。给出ΣL(n)3≤n≤1000 000等于55535191115。 </p><p>找ΣL(n)为3≤n≤100000 000 </p></section>
|
|
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
<section id="instructions">
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
2020-02-18 01:40:55 +09:00
|
|
|
|
- text: <code>euler417()</code>应该返回446572970925740。
|
|
|
|
|
testString: assert.strictEqual(euler417(), 446572970925740);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler417() {
|
|
|
|
|
// Good luck!
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler417();
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
|
|
|
|
/section>
|