freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-114-counting-block-...

24 lines
724 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f3e01000cf542c50fef2
title: 问题114计数块组合I
challengeType: 5
videoUrl: ''
---
# --description--
测量七个单元长度的行具有红色块,其上放置有最小长度为三个单元,使得任何两个红色块(允许为不同长度)由至少一个黑色方块隔开。有七种方法可以做到这一点。
一行可以测量多达50个长度的行数注意虽然上面的示例不适合这种可能性但通常允许混合块大小。例如在一个长度为8个单位的行上您可以使用红色3黑色1和红色4
# --hints--
`euler114()`应该返回16475640049。
```js
assert.strictEqual(euler114(), 16475640049);
```
# --solutions--