Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-127-abc-hits.md
2022-01-20 20:30:18 +01:00

57 lines
1.1 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-hit'
challengeType: 5
forumTopicId: 301754
dashedName: problem-127-abc-hits
---
# --description--
$n$ の累乗根 $rad(n)$ は、$n$ の相異なる素数の積です。 例えば、$504 = 2^3 × 3^2 × 7$ なので、$rad(504) = 2 × 3 × 7 = 42$ です。
以下が成り立つとき、正の整数 (a, b, c) の三つ組数を "abc-hit" と呼ぶことにします。
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-hit です。
1. $GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1$
2. $5 < 27$
3. $5 + 27 = 32$
4. $rad(4320) = 30 < 32$
abc-hit は極めてまれです。$c < 1000$ のとき、abc-hits はわずか 31 個であり $\sum{c} = 12523$ です。
$c < 120000$ のとき、$\sum{c}$ を求めなさい。
# --hints--
`abcHits()``18407904` を返す必要があります。
```js
assert.strictEqual(abcHits(), 18407904);
```
# --seed--
## --seed-contents--
```js
function abcHits() {
return true;
}
abcHits();
```
# --solutions--
```js
// solution required
```