56 lines
1.8 KiB
Markdown
56 lines
1.8 KiB
Markdown
---
|
||
id: 5900f4691000cf542c50ff7c
|
||
challengeType: 5
|
||
title: 'Problem 253: Tidying up'
|
||
videoUrl: ''
|
||
localeTitle: 问题253:整理
|
||
---
|
||
|
||
## Description
|
||
<section id="description">一个小孩子有一个“数字毛毛虫”,由四十个拼图块组成,每个拼图上有一个数字,当它们连成一条线时,按顺序显示数字1到40。 <p>每天晚上,孩子的父亲必须拿起散落在游戏室的毛毛虫的碎片。他随机拿起碎片并按正确顺序放置。当毛虫以这种方式建立时,它形成了逐渐融合在一起的不同部分。段的数量从零开始(没有放置件),通常增加到大约十一或十二,然后在完成单个段(放置所有件)之前往往再次下降。 </p><p>例如: </p><p>片段放置所以Far121422936434554354 ...... </p><p>设M是毛虫随机整理过程中遇到的最大段数。对于十件毛毛虫来说,每个M的可能性是多少</p><p> M Possibilities1512 2250912 31815264 41418112 5144000 </p><p>所以M的最可能值是3,平均值是385643/113400 = 3.400732,四舍五入到小数点后六位。 </p><p>对于四十件毛毛虫而言,M最可能的价值是11;但是M的平均值是多少?将您的答案四舍五入到小数点后六位。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler253()</code>应返回11.492847。
|
||
testString: 'assert.strictEqual(euler253(), 11.492847, "<code>euler253()</code> should return 11.492847.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler253() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler253();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|