freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-395-pythagorean-tre...

56 lines
1.6 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: 5900f4f71000cf542c51000a
challengeType: 5
title: 'Problem 395: Pythagorean tree'
videoUrl: ''
localeTitle: 问题395毕达哥拉斯树
---
## Description
<section id="description">毕达哥拉斯树是由以下程序产生的分形: <p>从单位正方形开始。然后将其中一个侧面称为基座在动画中底侧是基座在基座对面的一侧安装一个直角三角形斜边与该侧面重合侧面为3-4- 5比率。请注意三角形的较小边必须位于相对于底边的“右”侧请参阅动画。将一个正方形附加到右三角形的每条腿上其一侧与该腿重合。对两个正方形重复此过程将两侧接触三角形作为基础。 </p><p>经过无数次迭代后,得到的数字是毕达哥拉斯树。 </p><p>可以看出,至少有一个矩形,其边与毕达哥拉斯树的最大正方形平行,完全包围了毕达哥拉斯树。 </p><p>找到这样的边界矩形可能的最小区域并将您的答案舍入到10个小数位。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler395()</code>应返回28.2453753155。
testString: 'assert.strictEqual(euler395(), 28.2453753155, "<code>euler395()</code> should return 28.2453753155.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler395() {
// Good luck!
return true;
}
euler395();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>