Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-394-eating-pie.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

43 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4f71000cf542c510009
title: 问题394吃馅饼
challengeType: 5
videoUrl: ''
dashedName: problem-394-eating-pie
---
# --description--
杰夫以一种不同寻常的方式吃馅饼。馅饼是圆形的。他首先沿着半径切割馅饼中的初始切口。虽然剩下至少给定的馅饼F分数但他执行以下程序 - 他从饼图中心到馅饼边框剩余的任何一点做两个切片,剩下的馅饼边框上的任何一点都有可能。这将把剩下的馅饼分成三块。 - 从最初的切割逆时针走,他拿出前两个馅饼并吃掉它们。当剩下不到一小部分馅饼时,他不再重复这个过程。相反,他吃剩下的所有馅饼。
对于x≥1设Ex是Jeff重复上述过程的预期次数F = 1 / x。可以证实E1= 1E2≈1.2676536759和E7.5≈2.1215732071。
找到E40舍入到小数点后面的10位小数。
# --hints--
`euler394()`应返回3.2370342194。
```js
assert.strictEqual(euler394(), 3.2370342194);
```
# --seed--
## --seed-contents--
```js
function euler394() {
return true;
}
euler394();
```
# --solutions--
```js
// solution required
```