56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
|
---
|
|||
|
id: 5900f4711000cf542c50ff84
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 261: Pivotal Square Sums'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题261:Pivotal Square Sums
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description">如果存在一对m> 0且n≥k的整数,则让我们称正整数ka square-pivot,使得直到k的(m + 1)个连续正方形的总和等于m个连续正方形的总和从(n + 1)开始: <p> (km)2 + ... + k2 =(n + 1)2 + ... +(n + m)2。 </p><p>一些小的方形枢轴是4:32 + 42 = 52 21:202 + 212 = 292 24:212 + 222 + 232 + 242 = 252 + 262 + 272 110:1082 + 1092 + 1102 = 1332 + 1342找到所有的总和不同的方形枢轴≤1010。 </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler261()</code>应该返回238890850232021。
|
|||
|
testString: 'assert.strictEqual(euler261(), 238890850232021, "<code>euler261()</code> should return 238890850232021.");'
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler261() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler261();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|