59 lines
1.2 KiB
Markdown
59 lines
1.2 KiB
Markdown
---
|
|
id: 5900f3e91000cf542c50fefc
|
|
challengeType: 5
|
|
title: 'Problem 125: Palindromic sums'
|
|
---
|
|
|
|
## Description
|
|
<section id='description'>
|
|
The palindromic number 595 is interesting because it can be written as the sum of consecutive squares: 62 + 72 + 82 + 92 + 102 + 112 + 122.
|
|
There are exactly eleven palindromes below one-thousand that can be written as consecutive square sums, and the sum of these palindromes is 4164. Note that 1 = 02 + 12 has not been included as this problem is concerned with the squares of positive integers.
|
|
Find the sum of all the numbers less than 108 that are both palindromic and can be written as the sum of consecutive squares.
|
|
</section>
|
|
|
|
## Instructions
|
|
<section id='instructions'>
|
|
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: <code>euler125()</code> should return 2906969179.
|
|
testString: assert.strictEqual(euler125(), 2906969179, '<code>euler125()</code> should return 2906969179.');
|
|
|
|
```
|
|
|
|
</section>
|
|
|
|
## Challenge Seed
|
|
<section id='challengeSeed'>
|
|
|
|
<div id='js-seed'>
|
|
|
|
```js
|
|
function euler125() {
|
|
// Good luck!
|
|
return true;
|
|
}
|
|
|
|
euler125();
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
```js
|
|
// solution required
|
|
```
|
|
|
|
</section>
|