freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-119-digit-power-sum...

56 lines
1.4 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: 5900f3e41000cf542c50fef6
challengeType: 5
title: 'Problem 119: Digit power sum'
videoUrl: ''
localeTitle: 'Задача 119: Суммарная сумма электроэнергии'
---
## Description
<section id="description"> Число 512 интересно, потому что оно равно сумме его цифр, поднятых до некоторой степени: 5 + 1 + 2 = 8 и 83 = 512. Другим примером числа с этим свойством является 614656 = 284. Мы определим быть n-м членом этой последовательности и настаивать на том, чтобы число должно содержать не менее двух цифр, чтобы иметь сумму. Вам дается, что a2 = 512 и a10 = 614656. Найдите a30. </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler119()</code> должен вернуть 248155780267521.
testString: 'assert.strictEqual(euler119(), 248155780267521, "<code>euler119()</code> should return 248155780267521.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler119() {
// Good luck!
return true;
}
euler119();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>