Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.md

45 lines
1.8 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: 5900f3e01000cf542c50fef2
title: 'Завдання 114: Підрахунок комбінацій блоків І'
challengeType: 5
forumTopicId: 301740
dashedName: problem-114-counting-block-combinations-i
---
# --description--
Рядок завдовжки сім одиниць містить червоні блоки, мінімальна довжина яких становить три одиниці, тому будь-які два червоні блоки (які можуть бути будь-якої довжини) розділені принаймні одним червоним квадратом. Є рівно 17 способів зробити це.
<img class="img-responsive center-block" alt="Можливі способи розміщення кубиків з мінімальною довжиною у три одиниці у рядку довжиною сім одиниць" src="https://cdn.freecodecamp.org/curriculum/project-euler/counting-block-combinations-i.png" style="background-color: white; padding: 10px;" />
Скількома способами можна заповнити ряд довжиною 50 одиниць?
**Примітка:** Хоча наведений вище приклад не дає такої можливості, загалом дозволяється змішувати розміри блоків. Наприклад, у рядку довжиною вісім одиниць можна використати червоний (3), чорний (1) та червоний (4).
# --hints--
`countingBlockOne()` повинен повертатися як `16475640049`.
```js
assert.strictEqual(countingBlockOne(), 16475640049);
```
# --seed--
## --seed-contents--
```js
function countingBlockOne() {
return true;
}
countingBlockOne();
```
# --solutions--
```js
// solution required
```