* 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>
39 lines
808 B
Markdown
39 lines
808 B
Markdown
---
|
||
id: 5900f3c81000cf542c50fedb
|
||
title: 问题92:方形数字链
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-92-square-digit-chains
|
||
---
|
||
|
||
# --description--
|
||
|
||
通过在数字中连续添加数字的平方来创建数字链,以形成新的数字,直到之前看到它为止。例如,44→32→13→10→1→1 85→89→145→42→20→4→16→37→58→89因此,任何到达1或89的链条都会卡在无限循环中。最令人惊讶的是,每个起始号码最终都会达到1或89.低于一千万的起始号码将达到89个?
|
||
|
||
# --hints--
|
||
|
||
`euler92()`应返回8581146。
|
||
|
||
```js
|
||
assert.strictEqual(euler92(), 8581146);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function squareDigitChains() {
|
||
|
||
return true;
|
||
}
|
||
|
||
squareDigitChains();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|