* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
1.3 KiB
1.3 KiB
id, title, challengeType, videoUrl, dashedName
id | title | challengeType | videoUrl | dashedName |
---|---|---|---|---|
5900f4031000cf542c50ff16 | 问题151:标准尺寸的纸张:期望值问题 | 5 | problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem |
--description--
印刷车间每周运行16批(工作),每批需要一张A5尺寸的特殊颜色纸。每个星期一早上,工头打开一个新信封,里面装着一张大小为A1的特殊纸张。他继续把它切成两半,从而得到两张A2尺寸的纸。然后,他将其中一个切成两半,得到两张A3尺寸,依此类推,直到他获得了本周第一批所需的A5尺寸纸张。所有未使用的纸张都放回信封中。
在每个后续批次开始时,他随机从信封中取出一张纸。如果它的大小为A5,他会使用它。如果它更大,他会重复“切成两半”的程序,直到他有他需要的东西,任何剩余的床单总是放回信封里。排除本周的第一批和最后一批,找到工头在信封中找到一张纸的预期次数(每周)。使用格式x.xxxxxx将您的答案四舍五入到小数点后六位。
--hints--
euler151()</ code>应该返回0.464399。
assert.strictEqual(euler151(), 0.464399);
--seed--
--seed-contents--
function euler151() {
return true;
}
euler151();
--solutions--
// solution required