freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-394-eating-pie.md

56 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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