* 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>
43 lines
900 B
Markdown
43 lines
900 B
Markdown
---
|
||
id: 5900f5411000cf542c510053
|
||
title: 问题469:空椅子
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-469-empty-chairs
|
||
---
|
||
|
||
# --description--
|
||
|
||
在一个房间里,N个椅子摆放在圆桌旁。骑士一个接一个地进入房间,随意选择一把可用的空椅子。为了拥有足够的肘部空间,骑士总是在彼此之间留下至少一把空座椅。
|
||
|
||
当没有任何合适的椅子时,确定空椅子的分数C.我们还将E(N)定义为C的期望值。我们可以验证E(4)= 1/2和E(6)= 5/9。
|
||
|
||
找到E(1018)。将答案四舍五入到小数点后十四位,形式为0.abcdefghijklmn。
|
||
|
||
# --hints--
|
||
|
||
`euler469()`应该返回0.56766764161831。
|
||
|
||
```js
|
||
assert.strictEqual(euler469(), 0.56766764161831);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler469() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler469();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|