Files

53 lines
2.1 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: 5900f40d1000cf542c50ff20
title: 'Проблема 161: Тріоміни'
challengeType: 5
forumTopicId: 301795
dashedName: problem-161-triominoes
---
# --description--
Тріоміно - це форма, що складається з трьох квадратів, з'єднаних за допомогою ребер.
Є дві основні форми:
<img class="img-responsive center-block" alt="дві основні форми тріомінів" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-1.gif" style="background-color: white; padding: 10px;" />
Існує шість можливих варіантів фігур:
<img class="img-responsive center-block" alt="форми тріомінів включно із варіантами" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-2.gif" style="background-color: white; padding: 10px;" />
Будь-яка таблиця з n на m, для якогї nxm ділиться на 3, може бути викладена тріомінами. Якщо ми розглядаємо також і плитки, що можуть бути отримані шляхом відбиття або обертання від іншої плитки, то існує 41 спосіб як таблицю 2 на 9 можна заповнити фігурами тріоміно:
<img class="img-responsive center-block" alt="анімація, що показує 41 спосіб заповнення таблиці 2 на 9 тріомінами" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-3.gif" style="background-color: white; padding: 10px;" />
Скількома способами таблицю 9 на 12 можна заповнити тріомінами таким чином?
# --hints--
`triominoes()` повинен повернутися як `20574308184277972`.
```js
assert.strictEqual(triominoes(), 20574308184277972);
```
# --seed--
## --seed-contents--
```js
function triominoes() {
return true;
}
triominoes();
```
# --solutions--
```js
// solution required
```