2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f3fa1000cf542c50ff0d
|
|
|
|
|
title: 'Problem 142: Perfect Square Collection'
|
2020-11-27 18:02:05 +00:00
|
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
|
forumTopicId: 301771
|
2021-01-13 02:31:00 +00:00
|
|
|
|
dashedName: problem-142-perfect-square-collection
|
2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --description--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2021-07-14 11:05:12 +00:00
|
|
|
|
Find the smallest $x + y + z$ with integers $x > y > z > 0$ such that $x + y$, $x − y$, $x + z$, $x − z$, $y + z$, $y − z$ are all perfect squares.
|
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-14 11:05:12 +00:00
|
|
|
|
`perfectSquareCollection()` should return `1006193`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
```js
|
2021-07-14 11:05:12 +00:00
|
|
|
|
assert.strictEqual(perfectSquareCollection(), 1006193);
|
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-14 11:05:12 +00:00
|
|
|
|
function perfectSquareCollection() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-14 11:05:12 +00:00
|
|
|
|
perfectSquareCollection();
|
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
|
|
|
|
|
```
|