---
id: 5900f3e01000cf542c50fef2
title: '問題 114：計算塊組合 I'
challengeType: 1
forumTopicId: 301740
dashedName: problem-114-counting-block-combinations-i
---

# --description--

A row measuring seven units in length has red blocks with a minimum length of three units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square. 有 17 種方法可以做到這一點。

<img class="img-responsive center-block" alt="Possible ways of placing block with a minimum length of three units, on a row with length of seven units" src="https://cdn.freecodecamp.org/curriculum/project-euler/counting-block-combinations-i.png" style="background-color: white; padding: 10px;" />

有多少種方法可以填充長度爲 50 個單位的行？

**Note:** Although the example above does not lend itself to the possibility, in general it is permitted to mix block sizes. 例如，在長度爲 8 個單位的行上，你可以使用紅色 (3)、黑色 (1) 和紅色 (4)。

# --hints--

`countingBlockOne()` should return `16475640049`.

```js
assert.strictEqual(countingBlockOne(), 16475640049);
```

# --seed--

## --seed-contents--

```js
function countingBlockOne() {

  return true;
}

countingBlockOne();
```

# --solutions--

```js
// solution required
```
