freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem.md
Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* 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>
2021-01-12 19:31:00 -07:00

1.3 KiB
Raw Blame History

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