2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
id: 5900f4801000cf542c50ff93
|
2021-02-06 04:42:36 +00:00
|
|
|
title: 'Problem 276: Primitive Triangles'
|
2018-10-10 18:03:03 -04:00
|
|
|
challengeType: 5
|
2021-02-06 04:42:36 +00:00
|
|
|
forumTopicId: 301926
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-276-primitive-triangles
|
2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --description--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
Consider the triangles with integer sides a, b and c with a ≤ b ≤ c.
|
|
|
|
|
|
|
|
An integer sided triangle (a,b,c) is called primitive if gcd(a,b,c)=1.
|
|
|
|
|
|
|
|
How many primitive integer sided triangles exist with a perimeter not exceeding 10 000 000?
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --hints--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
`euler276()` should return 5777137137739633000.
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
```js
|
2020-12-16 00:37:30 -07:00
|
|
|
assert.strictEqual(euler276(), 5777137137739633000);
|
2018-10-10 18:03:03 -04:00
|
|
|
```
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler276() {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler276();
|
|
|
|
```
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --solutions--
|
2020-08-13 17:24:35 +02:00
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|