freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-292-pythagorean-pol...

63 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5900f4911000cf542c50ffa3
challengeType: 5
title: 'Problem 292: Pythagorean Polygons'
---
## Description
<section id='description'>
We shall define a pythagorean polygon to be a convex polygon with the following properties:there are at least three vertices,
no three vertices are aligned,
each vertex has integer coordinates,
each edge has integer length.For a given integer n, define P(n) as the number of distinct pythagorean polygons for which the perimeter is ≤n.
Pythagorean polygons should be considered distinct as long as none is a translation of another.
You are given that P(4)=1, P(30)=3655 and P(60)=891045.
Find P(120).
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler292()</code> should return 3600060866.
testString: assert.strictEqual(euler292(), 3600060866, '<code>euler292()</code> should return 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>