65 lines
1.1 KiB
Markdown
65 lines
1.1 KiB
Markdown
---
|
||
id: 5900f4911000cf542c50ffa3
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
localeTitle: 问题292:勾股多边形
|
||
---
|
||
|
||
## Description
|
||
<section id="description">
|
||
我们将勾股定线多边形定义为具有以下特性的凸多边形:至少有三个顶点,
|
||
没有三个顶点对齐,
|
||
每个顶点都有整数坐标
|
||
每个边都有整数长度。对于给定的整数n,将P(n)定义为周长≤n的不同毕达哥拉斯多边形的数量。
|
||
毕达哥拉斯多边形应该被认为是不同的,只要它们都不是另一个的翻译即可。
|
||
|
||
给出P(4)= 1,P(30)= 3655和P(60)= 891045。
|
||
找出P(120)。
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler292()</code>应该返回3600060866。
|
||
testString: assert.strictEqual(euler292(), 3600060866);
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler292() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler292();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
|
||
/section>
|