fix(curriculum): clean-up Project Euler 301-320 (#42926)
* fix: clean-up Project Euler 301-320 * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@ -8,18 +8,18 @@ dashedName: problem-307-chip-defects
|
||||
|
||||
# --description--
|
||||
|
||||
k defects are randomly distributed amongst n integrated-circuit chips produced by a factory (any number of defects may be found on a chip and each defect is independent of the other defects).
|
||||
$k$ defects are randomly distributed amongst $n$ integrated-circuit chips produced by a factory (any number of defects may be found on a chip and each defect is independent of the other defects).
|
||||
|
||||
Let p(k,n) represent the probability that there is a chip with at least 3 defects. For instance p(3,7) ≈ 0.0204081633.
|
||||
Let $p(k,n)$ represent the probability that there is a chip with at least 3 defects. For instance $p(3,7) ≈ 0.0204081633$.
|
||||
|
||||
Find p(20 000, 1 000 000) and give your answer rounded to 10 decimal places in the form 0.abcdefghij
|
||||
Find $p(20\\,000, 1\\,000\\,000)$ and give your answer rounded to 10 decimal places in the form 0.abcdefghij
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler307()` should return 0.7311720251.
|
||||
`chipDefects()` should return `0.7311720251`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler307(), 0.7311720251);
|
||||
assert.strictEqual(chipDefects(), 0.7311720251);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler307(), 0.7311720251);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler307() {
|
||||
function chipDefects() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler307();
|
||||
chipDefects();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user