mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-20 16:00:35 -05:00
1.1 KiB
1.1 KiB
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f3ec1000cf542c50fefe | Problem 127: abc-hits | 1 | 301754 | problem-127-abc-hits |
--description--
The radical of n, rad(n), is the product of distinct prime factors of n. Zum Beispiel: 504 = 2^3 × 3^2 × 7, also rad(504) = 2 × 3 × 7 = 42.
Wir definieren das Tripel positiver ganzer Zahlen (a, b, c) als einen abc-Treffer, wenn:
GCD(a, b) = GCD(a, c) = GCD(b, c) = 1a < ba + b = crad(abc) < c
Zum Beispiel ist (5, 27, 32) ein abc-Treffer, weil:
GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 15 < 275 + 27 = 32rad(4320) = 30 < 32
Es stellt sich heraus, dass abc-Treffer recht selten sind und es nur einunddreißig abc-Treffer für c < 1000 gibt, mit \sum{c} = 12523.
Finde \sum{c} für c < 120000.
--hints--
abcHits() sollte 18407904 zurückgeben.
assert.strictEqual(abcHits(), 18407904);
--seed--
--seed-contents--
function abcHits() {
return true;
}
abcHits();
--solutions--
// solution required