Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-95-amicable-chains.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* 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>
2021-01-12 19:31:00 -07:00

39 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3cc1000cf542c50fede
title: 问题95友好的链条
challengeType: 5
videoUrl: ''
dashedName: problem-95-amicable-chains
---
# --description--
一个数的适当除数是除数字本身之外的所有除数。例如28的正确除数是1,2,4,7和14.由于这些除数的总和等于28我们称之为完全数。有趣的是220的适当除数之和为284284的适当除数之和为220形成两个数的链。出于这个原因220和284被称为友好对。也许鲜为人知的是较长的链条。例如从12496开始我们形成一个五个数字的链12496→14288→15472→14536→14264→12496→...)由于该链返回其起始点,因此称为友好链。找到最长友好链中最小的成员,没有超过一百万的元素。
# --hints--
`euler95()`应返回14316。
```js
assert.strictEqual(euler95(), 14316);
```
# --seed--
## --seed-contents--
```js
function amicableChains() {
return true;
}
amicableChains();
```
# --solutions--
```js
// solution required
```