2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4711000cf542c50ff84
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2020-10-01 17:54:21 +02:00
|
|
|
|
title: 问题261:Pivotal Square Sums
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 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。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.strictEqual(euler261(), 238890850232021);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</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
|
|
|
|
|
```
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
|
|
|
|
/section>
|