Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.md
gikf c18554dd44 fix(curriculum): clean-up Project Euler 341-360 (#42998)
* fix: clean-up Project Euler 341-360

* fix: improve wording

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-29 19:14:22 +02:00

1.0 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4c81000cf542c50ffdb Problem 348: Sum of a square and a cube 5 302007 problem-348-sum-of-a-square-and-a-cube

--description--

Many numbers can be expressed as the sum of a square and a cube. Some of them in more than one way.

Consider the palindromic numbers that can be expressed as the sum of a square and a cube, both greater than 1, in exactly 4 different ways.

For example, 5229225 is a palindromic number and it can be expressed in exactly 4 different ways:

$$\begin{align} & {2285}^2 + {20}^3 \\ & {2223}^2 + {66}^3 \\ & {1810}^2 + {125}^3 \\ & {1197}^2 + {156}^3 \end{align}$$

Find the sum of the five smallest such palindromic numbers.

--hints--

sumOfSquareAndCube() should return 1004195061.

assert.strictEqual(sumOfSquareAndCube(), 1004195061);

--seed--

--seed-contents--

function sumOfSquareAndCube() {

  return true;
}

sumOfSquareAndCube();

--solutions--

// solution required