2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f44e1000cf542c50ff5f
|
|
|
|
title: 'Problem 224: Almost right-angled triangles II'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 301867
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-224-almost-right-angled-triangles-ii
|
2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --description--
|
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
Let us call an integer sided triangle with sides $a ≤ b ≤ c$ barely obtuse if the sides satisfy $a^2 + b^2 = c^2 - 1$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
How many barely obtuse triangles are there with perimeter $≤ 75\\,000\\,000$?
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --hints--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
`almostRightAngledTrianglesTwo()` should return `4137330`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
2021-07-15 12:26:34 +00:00
|
|
|
assert.strictEqual(almostRightAngledTrianglesTwo(), 4137330);
|
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
|
2021-07-15 12:26:34 +00:00
|
|
|
function almostRightAngledTrianglesTwo() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
almostRightAngledTrianglesTwo();
|
2018-09-30 22:01:58 +00:00
|
|
|
```
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --solutions--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|