Files

57 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3ec1000cf542c50fefe
title: 'Завдання 127: abc-збіги'
challengeType: 5
forumTopicId: 301754
dashedName: problem-127-abc-hits
---
# --description--
Радикалом числа $n$, $rad(n)$ називають добуток простих множників $n$. Наприклад, $504 = 2^3 × 3^2 × 7$, отже $rad(504) = 2 × 7 = 42$.
Нехай число-триплет з додатними цілими числами (a, b, c) abc-збіг, якщо:
1. $GCD(a, b) = GCD(a, c) = GCD(b, c) = 1$
2. $a < b$
3. $a + b = c$
4. $rad(abc) < c$
Наприклад, (5, 27, 32) - це abc-збіг, тому що:
1. $GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1$
2. $5 < 27$
3. $5 + 27 = 32$
4. $rad(4320) = 30 < 32$
Виявляється, abc-збіги - досить рідкісні і існує тільки 31 abc-збігів для $c < 1000$, with $\sum{c} = 12523$.
Знайдіть $\sum{c}$ для $c < 120000$.
# --hints--
`abcHits()` повинен повертатися як `18407904`.
```js
assert.strictEqual(abcHits(), 18407904);
```
# --seed--
## --seed-contents--
```js
function abcHits() {
return true;
}
abcHits();
```
# --solutions--
```js
// solution required
```