Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-408-admissible-paths-through-a-grid.russian.md

55 lines
1.6 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: 5900f5091000cf542c51001b
challengeType: 5
title: 'Problem 408: Admissible paths through a grid'
videoUrl: ''
localeTitle: 'Задача 408: Допустимые пути через сетку'
---
## Description
<section id="description"> Назовем точку решетки (x, y) недопустимой, если x, y и x + y - все положительные совершенные квадраты. Например, (9, 16) недопустимо, а (0, 4), (3, 1) и (9, 4) - нет. <p> Рассмотрим путь от точки (x1, y1) до точки (x2, y2), используя только единичные шаги на север или восток. Назовем такой путь допустимым, если ни одна из его промежуточных точек недопустима. </p><p> Пусть P (n) - число допустимых путей от (0, 0) до (n, n). Можно проверить, что P (5) = 252, P (16) = 596994440 и P (1000) mod 1 000 000 007 = 341920854. </p><p> Найти P (10 000 000) mod 1 000 000 007. </p></section>
## Instructions
undefined
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler408()</code> должен вернуть 299742733.
testString: 'assert.strictEqual(euler408(), 299742733, "<code>euler408()</code> should return 299742733.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler408() {
// Good luck!
return true;
}
euler408();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>