2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4de1000cf542c50fff1
|
|
|
|
title: 'Problem 370: Geometric triangles'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 302032
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-370-geometric-triangles
|
2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --description--
|
|
|
|
|
|
|
|
Let us define a geometric triangle as an integer sided triangle with sides a ≤ b ≤ c so that its sides form a geometric progression, i.e. b2 = a · c .
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
An example of such a geometric triangle is the triangle with sides a = 144, b = 156 and c = 169.
|
|
|
|
|
|
|
|
There are 861805 geometric triangles with perimeter ≤ 106 .
|
|
|
|
|
|
|
|
How many geometric triangles exist with perimeter ≤ 2.5·1013 ?
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --hints--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
`euler370()` should return 41791929448408.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
|
|
|
assert.strictEqual(euler370(), 41791929448408);
|
2018-09-30 22:01:58 +00:00
|
|
|
```
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --seed--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
## --seed-contents--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
function euler370() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler370();
|
|
|
|
```
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --solutions--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|