Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-95-amicable-chains.russian.md

56 lines
2.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
challengeType: 5
title: 'Problem 95: Amicable chains'
videoUrl: ''
localeTitle: 'Проблема 95: дружественные цепи'
---
## Description
<section id="description"> Собственные делители числа - это все делители, исключая само число. Например, правильные делители 28 равны 1, 2, 4, 7 и 14. Так как сумма этих делителей равна 28, мы называем это совершенным числом. Интересно, что сумма правильных делителей 220 равна 284, а сумма собственных делителей 284 равна 220, образуя цепочку из двух чисел. По этой причине 220 и 284 называются дружной парой. Возможно, менее известны более длинные цепи. Например, начиная с 12496, мы формируем цепочку из пяти чисел: 12496 → 14288 → 15472 → 14536 → 14264 (→ 12496 → ...) Так как эта цепочка возвращается к исходной точке, она называется дружной цепочкой. Найдите наименьшего члена самой длинной дружной цепи без элемента, превышающего один миллион. </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler95()</code> должен возвращать 14316.
testString: 'assert.strictEqual(euler95(), 14316, "<code>euler95()</code> should return 14316.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler95() {
// Good luck!
return true;
}
euler95();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>