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