Files
freeCodeCamp/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-127-abc-hits.md
2023-01-13 09:48:11 -08:00

57 lines
1.1 KiB
Markdown
Raw 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: 'Problem 127: abc-hits'
challengeType: 1
forumTopicId: 301754
dashedName: 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:
1. $GCD(a, b) = GCD(a, c) = GCD(b, c) = 1$
2. $a < b$
3. $a + b = c$
4. $rad(abc) < c$
Zum Beispiel ist (5, 27, 32) ein abc-Treffer, weil:
1. $GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1$
2. $5 < 27$
3. $5 + 27 = 32$
4. $rad(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.
```js
assert.strictEqual(abcHits(), 18407904);
```
# --seed--
## --seed-contents--
```js
function abcHits() {
return true;
}
abcHits();
```
# --solutions--
```js
// solution required
```