Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.russian.md

56 lines
1.8 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: 5900f4951000cf542c50ffa8
challengeType: 5
title: 'Problem 297: Zeckendorf Representation'
videoUrl: ''
localeTitle: 'Задача 297: Отметьте деревенское представление'
---
## Description
<section id="description"> Каждый новый член в последовательности Фибоначчи генерируется путем добавления предыдущих двух членов. Начиная с 1 и 2, первые 10 членов будут: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. <p> Каждое положительное целое число может быть однозначно записано в виде суммы некогерентных членов последовательности Фибоначчи. Например, 100 = 3 + 8 + 89. Такая сумма называется представлением Цекендорфа числа. </p><p> Для любого целого n&gt; 0 пусть z (n) - число членов в представлении Zeckendorf n. Таким образом, z (5) = 1, z (14) = 2, z (100) = 3 и т. Д. Кроме того, при 0 &lt;n &lt;106, Σ z (n) = 7894453. </p><p> Найти Σ z (n) при 0 &lt;n &lt;1017. </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler297()</code> должен вернуть 2252639041804718000.
testString: 'assert.strictEqual(euler297(), 2252639041804718000, "<code>euler297()</code> should return 2252639041804718000.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler297() {
// Good luck!
return true;
}
euler297();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>