2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4671000cf542c50ff7a
|
|
|
|
title: 'Problem 251: Cardano Triplets'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 301899
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-251-cardano-triplets
|
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-16 10:21:45 +00:00
|
|
|
A triplet of positive integers ($a$,$b$,$c$) is called a Cardano Triplet if it satisfies the condition:
|
|
|
|
|
|
|
|
$$\sqrt[3]{a + b \sqrt{c}} + \sqrt[3]{a - b \sqrt{c}} = 1$$
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
For example, (2,1,5) is a Cardano Triplet.
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
There exist 149 Cardano Triplets for which $a + b + c ≤ 1000$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
Find how many Cardano Triplets exist such that $a + b + c ≤ 110\\,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-16 10:21:45 +00:00
|
|
|
`cardanoTriplets()` should return `18946051`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
2021-07-16 10:21:45 +00:00
|
|
|
assert.strictEqual(cardanoTriplets(), 18946051);
|
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-16 10:21:45 +00:00
|
|
|
function cardanoTriplets() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
cardanoTriplets();
|
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
|
|
|
|
```
|