Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-416-a-frogs-trip.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: 5900f50e1000cf542c510020
challengeType: 5
title: 'Problem 416: A frog"s trip'
videoUrl: ''
localeTitle: 'Проблема 416: поездка лягушки'
---
## Description
<section id="description"> Ряд n квадратов содержит лягушку в крайнем левом квадрате. Посредством последовательных прыжков лягушка идет к самому правому квадрату, а затем обратно к самому левому квадрату. Во внешней поездке он прыгает на один, два или три квадрата вправо, а в поездке домой он прыгает влево аналогичным образом. Он не может прыгать за пределы квадратов. Он повторяет путешествие туда и обратно m раз. <p> Пусть F (m, n) - число способов перемещения лягушки, так что не более одного квадрата остается невидимым. Например, F (1, 3) = 4, F (1, 4) = 15, F (1, 5) = 46, F (2, 3) = 16 и F (2, 100) mod 109 = 429619151. </p><p> Найдите последние 9 цифр F (10, 1012). </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler416()</code> должен вернуть 898082747.
testString: 'assert.strictEqual(euler416(), 898082747, "<code>euler416()</code> should return 898082747.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler416() {
// Good luck!
return true;
}
euler416();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>