Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-469-empty-chairs.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* 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>
2021-01-12 19:31:00 -07:00

947 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f5411000cf542c510053 Problem 469: Empty chairs 5 302144 problem-469-empty-chairs

--description--

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.

Find E(1018). Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn.

--hints--

euler469() should return 0.56766764161831.

assert.strictEqual(euler469(), 0.56766764161831);

--seed--

--seed-contents--

function euler469() {

  return true;
}

euler469();

--solutions--

// solution required