56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
|
---
|
|||
|
id: 5900f4c11000cf542c50ffd3
|
|||
|
challengeType: 5
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题341:Golomb的自我描述序列
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description"> Golomb的自描述序列{G(n)}是唯一的非递减自然数序列,因此n在序列中恰好出现G(n)次。前几个n的G(n)值是<p> n123456789101112131415 ... G(n)的122334445556666 ... </p><p>给出G(103)= 86,G(106)= 6137.对于1≤n<103,还给出ΣG(n3)= 153506976。 </p><p>找到ΣG(n3)为1≤n<106。 </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler341()</code>应该返回56098610614277016。
|
|||
|
testString: assert.strictEqual(euler341(), 56098610614277016);
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler341() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler341();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
|
|||
|
/section>
|