56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
---
|
||
id: 5900f3e01000cf542c50fef3
|
||
challengeType: 5
|
||
title: 'Problem 116: Red, green or blue tiles'
|
||
videoUrl: ''
|
||
localeTitle: 问题116:红色,绿色或蓝色瓷砖
|
||
---
|
||
|
||
## Description
|
||
<section id="description">一排五个黑色正方形瓷砖是用彩色椭圆形瓷砖代替的,其中红色(长度为2),绿色(长度为3)或蓝色(长度为4)。如果选择红色瓷砖,则可以通过七种方式完成此操作。 <p>如果选择绿色瓷砖,有三种方法。 </p><p>如果选择蓝色瓷砖,有两种方法。 </p><p>假设颜色不能混合,则有7 + 3 + 2 = 12种方式替换长度为五个单位的行中的黑色瓷砖。如果不能混合颜色并且必须使用至少一个彩色瓷砖,那么连续测量五十个单位的黑色瓷砖有多少种不同的方式可以替换?注意:这与问题117有关。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler116()</code>应该返回20492570929。
|
||
testString: 'assert.strictEqual(euler116(), 20492570929, "<code>euler116()</code> should return 20492570929.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler116() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler116();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|