Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.md
2022-04-11 19:34:39 +05:30

49 lines
1.3 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: 5900f4c81000cf542c50ffdb
title: 'Завдання 348: Сума квадрата і куба'
challengeType: 5
forumTopicId: 302007
dashedName: problem-348-sum-of-a-square-and-a-cube
---
# --description--
Багато чисел можна виразити як суму квадрата та куба. Деякі з них більше ніж одним способом.
Розглянемо паліндромні числа, які можна виразити як суму квадрата та куба, обидва більші за 1, рівно 4 різними способами.
Наприклад, 5229225 - це паліндромне число, яке можна записати 4 способами:
$$\begin{align} & {2285}^2 + {20}^3 \\\\
& {2223}^2 + {66}^3 \\\\ & {1810}^2 + {125}^3 \\\\
& {1197}^2 + {156}^3 \end{align}$$
Знайдіть суму п'яти найменших таких паліндромних чисел.
# --hints--
`sumOfSquareAndCube()` має повернутися як`1004195061`.
```js
assert.strictEqual(sumOfSquareAndCube(), 1004195061);
```
# --seed--
## --seed-contents--
```js
function sumOfSquareAndCube() {
return true;
}
sumOfSquareAndCube();
```
# --solutions--
```js
// solution required
```