Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.md

50 lines
1.5 KiB
Markdown
Raw Permalink 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: 5900f4591000cf542c50ff6c
title: 'Завдання 237: Маршрути на ігровій дошці 4 x n'
challengeType: 5
forumTopicId: 301882
dashedName: problem-237-tours-on-a-4-x-n-playing-board
---
# --description--
Нехай $T(n)$ — це кількість маршрутів на ігровій дошці 4 × $n$:
- Маршрут починається у верхньому лівому куті.
- Маршрут складається з ходів вгору, вниз, вліво або вправо на одну клітинку.
- Маршрут проходить по кожному квадрату лише один раз.
- Маршрут закінчується в нижньому лівому кутку.
На малюнку зображено один із маршрутів на дошці 4 × 10:
<img class="img-responsive center-block" alt="один із маршрутів по дошці 4 х 10" src="https://cdn.freecodecamp.org/curriculum/project-euler/tours-on-a-4-x-n-playing-board.gif" style="background-color: white; padding: 10px;" />
$T(10)$ дорівнює 2329. Чому дорівнює $T({10}^{12})$ по модулю ${10}^8$?
# --hints--
`toursOnPlayingBoard()` має повернути `15836928`.
```js
assert.strictEqual(toursOnPlayingBoard(), 15836928);
```
# --seed--
## --seed-contents--
```js
function toursOnPlayingBoard() {
return true;
}
toursOnPlayingBoard();
```
# --solutions--
```js
// solution required
```