39 lines
653 B
Markdown
39 lines
653 B
Markdown
---
|
||
id: 5900f3e41000cf542c50fef7
|
||
title: 问题120:方形剩余部分
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-120-square-remainders
|
||
---
|
||
|
||
# --description--
|
||
|
||
设r是(a-1)n +(a + 1)n除以a2时的余数。例如,如果a = 7且n = 3,则r = 42:63 + 83 =728≡42mod 49.并且当n变化时,r也将变化,但是对于a = 7,结果是rmax = 42。对于3≤a≤1000,找到Σrmax。
|
||
|
||
# --hints--
|
||
|
||
`euler120()`应返回333082500。
|
||
|
||
```js
|
||
assert.strictEqual(euler120(), 333082500);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler120() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler120();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|