* 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>
39 lines
954 B
Markdown
39 lines
954 B
Markdown
---
|
||
id: 5900f3d01000cf542c50fee3
|
||
title: 问题100:安排概率
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-100-arranged-probability
|
||
---
|
||
|
||
# --description--
|
||
|
||
如果一个盒子包含21个彩色光盘,由15个蓝色光盘和6个红色光盘组成,随机拍摄两张光盘,可以看出拍摄两张蓝色光盘的概率,P(BB)=(15/21) )×(14/20)= 1/2。下一个这样的安排,其中有50%的机会随机拍摄两张蓝色光盘,是一个包含八十五个蓝色光盘和三十五个红色光盘的盒子。通过找到第一个包含总共超过1012 = 1,000,000,000,000个光盘的布置,确定该盒子将包含的蓝色光盘的数量。
|
||
|
||
# --hints--
|
||
|
||
`euler100()`应该返回756872327473。
|
||
|
||
```js
|
||
assert.strictEqual(euler100(), 756872327473);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function arrangedProbability() {
|
||
|
||
return true;
|
||
}
|
||
|
||
arrangedProbability();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|