22 lines
914 B
Markdown
22 lines
914 B
Markdown
---
|
||
id: 5900f3df1000cf542c50fef1
|
||
title: 问题115:计数块组合II
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
---
|
||
|
||
# --description--
|
||
|
||
注意:这是问题114的更难的版本。测量n个单位长度的行具有红色块,其上放置最小长度为m个单位,使得任何两个红色块(允许不同长度)被分开至少有一个黑色方块。让fill-count函数F(m,n)表示可以填充行的方式的数量。例如,F(3,29)= 673135和F(3,30)= 1089155.也就是说,对于m = 3,可以看出n = 30是填充计数函数首次超过的最小值一百万。同样,对于m = 10,可以验证F(10,56)= 880711和F(10,57)= 1148904,因此n = 57是填充计数函数首次超过的最小值一百万。对于m = 50,找到填充计数函数首先超过一百万的n的最小值。
|
||
|
||
# --hints--
|
||
|
||
`euler115()`应返回168。
|
||
|
||
```js
|
||
assert.strictEqual(euler115(), 168);
|
||
```
|
||
|
||
# --solutions--
|
||
|