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.2 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f48a1000cf542c50ff9c 问题285毕达哥拉斯赔率 5 problem-285-pythagorean-odds

--description--

Albert选择一个正整数k然后在区间[0,1]中以均匀分布随机选择两个实数ab。

然后计算和k·a + 12 +k·b + 12的平方根并四舍五入为最接近的整数。 如果结果等于k他得分为k分 否则他什么也没得分。

例如如果k 6a 0.2b 0.85k·a + 12 +k·b + 12 42.05。 42.05的平方根是6.484 ...四舍五入到最接近的整数后它变为6。 这等于k因此他得到6分。

可以看出如果他以k = 1k = 2...k = 10进行10圈则他的总得分的期望值四舍五入到小数点后五位。

如果他以k = 1k = 2k = 3...k = 105进行105转他的总得分的期望值是多少四舍五入到小数点后五位

--hints--

euler285()应该返回157055.80999。

assert.strictEqual(euler285(), 157055.80999);

--seed--

--seed-contents--

function euler285() {

  return true;
}

euler285();

--solutions--

// solution required