freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-100-arranged-probab...

56 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5900f3d01000cf542c50fee3
challengeType: 5
title: 'Problem 100: Arranged probability'
videoUrl: ''
localeTitle: 问题100安排概率
---
## Description
<section id="description">如果一个盒子包含21个彩色光盘由15个蓝色光盘和6个红色光盘组成随机拍摄两张光盘可以看出拍摄两张蓝色光盘的概率PBB=15/21 ×14/20= 1/2。下一个这样的安排其中有50的机会随机拍摄两张蓝色光盘是一个包含八十五个蓝色光盘和三十五个红色光盘的盒子。通过找到第一个包含总共超过1012 = 1,000,000,000,000个光盘的布置确定该盒子将包含的蓝色光盘的数量。 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler100()</code>应该返回756872327473。
testString: 'assert.strictEqual(euler100(), 756872327473, "<code>euler100()</code> should return 756872327473.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler100() {
// Good luck!
return true;
}
euler100();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>