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

22 lines
758 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f3d01000cf542c50fee3
title: 问题100安排概率
challengeType: 5
videoUrl: ''
---
# --description--
如果一个盒子包含21个彩色光盘由15个蓝色光盘和6个红色光盘组成随机拍摄两张光盘可以看出拍摄两张蓝色光盘的概率PBB=15/21 ×14/20= 1/2。下一个这样的安排其中有50的机会随机拍摄两张蓝色光盘是一个包含八十五个蓝色光盘和三十五个红色光盘的盒子。通过找到第一个包含总共超过1012 = 1,000,000,000,000个光盘的布置确定该盒子将包含的蓝色光盘的数量。
# --hints--
`euler100()`应该返回756872327473。
```js
assert.strictEqual(euler100(), 756872327473);
```
# --solutions--