* 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>
49 lines
898 B
Markdown
49 lines
898 B
Markdown
---
|
||
id: 5900f4911000cf542c50ffa3
|
||
title: 问题292:勾股多边形
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-292-pythagorean-polygons
|
||
---
|
||
|
||
# --description--
|
||
|
||
我们将勾股定线多边形定义为具有以下特性的凸多边形:至少有三个顶点,
|
||
|
||
没有三个顶点对齐,
|
||
|
||
每个顶点都有整数坐标
|
||
|
||
每个边都有整数长度。对于给定的整数n,将P(n)定义为周长≤n的不同毕达哥拉斯多边形的数量。
|
||
|
||
毕达哥拉斯多边形应该被认为是不同的,只要它们都不是另一个的翻译即可。
|
||
|
||
给出P(4)= 1,P(30)= 3655和P(60)= 891045。 找出P(120)。
|
||
|
||
# --hints--
|
||
|
||
`euler292()`应该返回3600060866。
|
||
|
||
```js
|
||
assert.strictEqual(euler292(), 3600060866);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler292() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler292();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|