43 lines
823 B
Markdown
43 lines
823 B
Markdown
---
|
|
id: 5900f4551000cf542c50ff68
|
|
title: '問題 233: 円周上の格子点'
|
|
challengeType: 5
|
|
forumTopicId: 301877
|
|
dashedName: problem-233-lattice-points-on-a-circle
|
|
---
|
|
|
|
# --description--
|
|
|
|
$(0,0)$, $(N,0)$, $(0,N)$, $(N,N)$ を通過する円周上にある、整数座標を持つ点の個数を $f(N)$ とします。
|
|
|
|
$f(10000) = 36$ であることが分かっています。
|
|
|
|
$f(N) = 420$ が成り立つ正の整数 $N ≤ {10}^{11}$ の総和を求めなさい。
|
|
|
|
# --hints--
|
|
|
|
`latticePointsOnACircle()` は `271204031455541300` を返す必要があります。
|
|
|
|
```js
|
|
assert.strictEqual(latticePointsOnACircle(), 271204031455541300);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function latticePointsOnACircle() {
|
|
|
|
return true;
|
|
}
|
|
|
|
latticePointsOnACircle();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|