freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-339-peredur-fab-efr...

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: 5900f4c01000cf542c50ffd2
challengeType: 5
videoUrl: ''
title: 问题339Peredur fab Efrawg
---
## Description
<section id="description"> “他走向一个山谷,河流穿过河谷;山谷的边界是树木繁茂的,河的两边是平坦的草地。河的一边,他看到一群白羊,另一只黑羊。每当一只白羊咩咩叫,其中一只黑羊就会越过白色;当其中一只黑羊咩咩叫的时候其中一只白羊会越过黑羊“en.wikisource.org <p>最初每群由n只绵羊组成。每只绵羊不论颜色同样可能是下一只咩咩咩的绵羊。在一只绵羊咩咩叫另一只羊的羊群已经越过之后Peredur可能会移走一些白羊以便最大化预期的最终黑羊数量。如果Peredur使用最优策略则让En成为预期的最终黑羊数量。 </p><p>给出E5= 6.871346舍入到小数点后面的6位。找到E10 000并将您的答案四舍五入到小数点后面的6位。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler339()</code>应返回19823.542204。
testString: assert.strictEqual(euler339(), 19823.542204);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler339() {
// Good luck!
return true;
}
euler339();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>