2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4801000cf542c50ff93
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 276: Primitive Triangles'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
Consider the triangles with integer sides a, b and c with a ≤ b ≤ c.
|
2018-10-08 00:01:53 +00:00
|
|
|
An integer sided triangle (a,b,c) is called primitive if gcd(a,b,c)=1.
|
2018-09-30 22:01:58 +00:00
|
|
|
How many primitive integer sided triangles exist with a perimeter not exceeding 10 000 000?
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler276()</code> should return 5777137137739633000.
|
2018-10-20 18:02:47 +00:00
|
|
|
testString: assert.strictEqual(euler276(), 5777137137739633000, '<code>euler276()</code> should return 5777137137739633000.');
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler276() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler276();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|