freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-127-abc-hits.russia...

56 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f3ec1000cf542c50fefe
challengeType: 5
title: 'Problem 127: abc-hits'
videoUrl: ''
localeTitle: 'Задача 127: abc-hits'
---
## Description
<section id="description"> Радикал n, rad (n), является произведением различных простых множителей n. Например, 504 = 23 × 32 × 7, поэтому rad (504) = 2 × 3 × 7 = 42. Мы определим триплет положительных целых чисел (a, b, c) как abc-hit, если: GCD ( a, b) = GCD (a, c) = GCD (b, c) = 1 a &lt;ba + b = c rad (abc) &lt;c Например, (5, 27, 32) является abc-hit, потому что : GCD (5, 27) = GCD (5, 32) = GCD (27, 32) = 1 5 &lt;27 5 + 27 = 32 рад (4320) = 30 &lt;32 Оказывается, abc-хиты довольно редки и существует только тридцать один abc-хиты для c &lt;1000, с Σc = 12523. Найдите Σc для c &lt;120000. </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler127()</code> должен вернуть 18407904.
testString: 'assert.strictEqual(euler127(), 18407904, "<code>euler127()</code> should return 18407904.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler127() {
// Good luck!
return true;
}
euler127();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>