Files
freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.english.md
Oliver Eyton-Williams f1c9b08cf3 fix(curriculum): add isHidden: false to challenges
This includes certificates (where it does nothing), but does not
include any translations.
2020-05-25 16:25:19 +05:30

1.1 KiB

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f4c81000cf542c50ffdb 5 false Problem 348: Sum of a square and a cube 302007

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: 22852 + 203 22232 + 663 18102 + 1253 11972 + 1563

Find the sum of the five smallest such palindromic numbers.

Instructions

Tests

tests:
  - text: <code>euler348()</code> should return 1004195061.
    testString: assert.strictEqual(euler348(), 1004195061);

Challenge Seed

function euler348() {
  // Good luck!
  return true;
}

euler348();

Solution

// solution required