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