2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f4801000cf542c50ff93
|
|
|
|
title: 'Problem 276: Primitive Triangles'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 301926
|
2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
Consider the triangles with integer sides a, b and c with a ≤ b ≤ c.
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
An integer sided triangle (a,b,c) is called primitive if gcd(a,b,c)=1.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
How many primitive integer sided triangles exist with a perimeter not exceeding 10 000 000?
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
`euler276()` should return 5777137137739633000.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
|
|
|
assert.strictEqual(euler276(), 5777137137739633000);
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
function euler276() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler276();
|
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|