fix(curriculum): clean-up Project Euler 462-480 (#43069)

* fix: clean-up Project Euler 462-480

* fix: missing image extension

* 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:
gikf
2021-07-30 17:32:21 +02:00
committed by GitHub
parent a2b2ef3f75
commit 397a9f0c3e
19 changed files with 309 additions and 240 deletions

View File

@ -8,22 +8,24 @@ dashedName: problem-469-empty-chairs
# --description--
In a room N chairs are placed around a round table.
In a room $N$ chairs are placed around a round table.
Knights enter the room one by one and choose at random an available empty chair.
To have enough elbow room the knights always leave at least one empty chair between each other.
When there aren't any suitable chairs left, the fraction C of empty chairs is determined. We also define E(N) as the expected value of C. We can verify that E(4) = 1/2 and E(6) = 5/9.
When there aren't any suitable chairs left, the fraction $C$ of empty chairs is determined. We also define $E(N)$ as the expected value of $C$.
Find E(1018). Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn.
We can verify that $E(4) = \frac{1}{2}$ and $E(6) = \frac{5}{9}$.
Find $E({10}^{18})$. Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn.
# --hints--
`euler469()` should return 0.56766764161831.
`emptyChairs()` should return `0.56766764161831`.
```js
assert.strictEqual(euler469(), 0.56766764161831);
assert.strictEqual(emptyChairs(), 0.56766764161831);
```
# --seed--
@ -31,12 +33,12 @@ assert.strictEqual(euler469(), 0.56766764161831);
## --seed-contents--
```js
function euler469() {
function emptyChairs() {
return true;
}
euler469();
emptyChairs();
```
# --solutions--