Files

45 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: 5900f3e41000cf542c50fef6
title: 'Задача 119: Сума чисел'
challengeType: 5
forumTopicId: 301745
dashedName: problem-119-digit-power-sum
---
# --description--
Число 512 цікаве тим, що воно дорівнює сумі його цифр, зведених у десяткову ступінь: $5 + 1 + 2 = 8$, і $8^3 = 512$. Інший приклад числа з цією властивістю - $614656 = 28^4$.
Ми визначимо $a_n$ як $n-th$ член цієї послідовності і наполягатимемо на тому, що число повинне містити щонайменше дві цифри, щоб мати суму.
Вам дано, що $a_2 = 512$ і $a_{10} = 614656$.
Знайдіть $a_{30}$.
# --hints--
`digitPowerSum()` повинен повертатися як `248155780267521`.
```js
assert.strictEqual(digitPowerSum(), 248155780267521);
```
# --seed--
## --seed-contents--
```js
function digitPowerSum() {
return true;
}
digitPowerSum();
```
# --solutions--
```js
// solution required
```