1.0 KiB
1.0 KiB
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
5900f3ec1000cf542c50fefe | Problema 127: abc-hit | 5 | 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) = 1
a < b
a + b = c
rad(abc) < c
Per esempio, (5, 27, 32) è un abc-hit poiché:
MCD(5, 27) = MCD(5, 32) = MCD(27, 32) = 1
5 < 27
5 + 27 = 32
rad(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