mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-08 00:00:41 -04:00
1.0 KiB
1.0 KiB
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f3ec1000cf542c50fefe | Problema 127: abc-hit | 1 | 301754 | problem-127-abc-hits |
--description--
Il radicale di n, rad(n), è il prodotto dei fattori primi distinti di n. Per esempio, 504 = 2^3 × 3^2 × 7, quindi rad(504) = 2 × 3 × 7 = 42.
Definiamo la tripletta di numeri interi positivi (a, b, c) come un abc-hit se:
MCD(a, b) = MCD(a, c) = MCD(b, c) = 1a < ba + b = crad(abc) < c
Per esempio, (5, 27, 32) è un abc-hit poiché:
MCD(5, 27) = MCD(5, 32) = MCD(27, 32) = 15 < 275 + 27 = 32rad(4320) = 30 < 32
Gli abc-hit sono piuttosto rari e ce ne sono solo trentuno per c < 1000, con \sum{c} = 12523.
Trova \sum{c} per c < 120000.
--hints--
abcHits() dovrebbe restituire 18407904.
assert.strictEqual(abcHits(), 18407904);
--seed--
--seed-contents--
function abcHits() {
return true;
}
abcHits();
--solutions--
// solution required