Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-318-2011-nines.russian.md

56 lines
2.1 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: 5900f4ab1000cf542c50ffbd
challengeType: 5
title: 'Problem 318: 2011 nines'
videoUrl: ''
localeTitle: 'Задача 318: 2011 куклы'
---
## Description
<section id="description"> Рассмотрим вещественное число √2 + √3. Когда мы вычисляем четные степени √2 + √3, получаем: (√2 + √3) 2 = 9.898979485566356 ... (√2 + √3) 4 = 97.98979485566356 ... (√2 + √3) 6 = 969.998969071069263 ... (√2 + √3) 8 = 9601.99989585502907 ... (√2 + √3) 10 = 95049.999989479221 ... (√2 + √3) 12 = 940897.9999989371855 ... (√2 + √3) 14 = 9313929.99999989263 ... (√2 + √3) 16 = 92198401.99999998915 ... <p> Похоже, что число последовательных девяток в начале дробной части этих степеней не уменьшается. На самом деле можно доказать, что дробная часть (√2 + √3) 2n приближается к 1 при больших n. </p><p> Рассмотрим все вещественные числа вида √p + √q с p и q положительными целыми числами и p &lt;q, так что дробная часть (√p + √q) 2n приближается к 1 при больших n. </p><p> Пусть C (p, q, n) - число последовательных nines в начале дробной части (√p + √q) 2n. </p><p> Пусть N (p, q) - минимальное значение n такое, что C (p, q, n) ≥ 2011. </p><p> Найти ΣN (p, q) для p + q ≤ 2011. </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler318()</code> должен вернуть 709313889.
testString: 'assert.strictEqual(euler318(), 709313889, "<code>euler318()</code> should return 709313889.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler318() {
// Good luck!
return true;
}
euler318();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>