* 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>
45 lines
798 B
Markdown
45 lines
798 B
Markdown
---
|
||
id: 5900f4c11000cf542c50ffd3
|
||
title: 问题341:Golomb的自我描述序列
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-341-golombs-self-describing-sequence
|
||
---
|
||
|
||
# --description--
|
||
|
||
Golomb的自描述序列{G(n)}是唯一的非递减自然数序列,因此n在序列中恰好出现G(n)次。前几个n的G(n)值是
|
||
|
||
n123456789101112131415 ... G(n)的122334445556666 ...
|
||
|
||
给出G(103)= 86,G(106)= 6137.对于1≤n<103,还给出ΣG(n3)= 153506976。
|
||
|
||
找到ΣG(n3)为1≤n<106。
|
||
|
||
# --hints--
|
||
|
||
`euler341()`应该返回56098610614277016。
|
||
|
||
```js
|
||
assert.strictEqual(euler341(), 56098610614277016);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler341() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler341();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|