2021-06-15 00:49:18 -07:00
---
id: 5900f5001000cf542c510013
2022-03-04 19:46:29 +05:30
title: 'Problema 403: punti del reticolo delimitati da parabola e linea'
2021-06-15 00:49:18 -07:00
challengeType: 5
forumTopicId: 302071
dashedName: problem-403-lattice-points-enclosed-by-parabola-and-line
---
# --description--
2022-03-04 19:46:29 +05:30
Per i numeri interi $a$ e $b$, definiamo $D(a, b)$ come il dominio racchiuso dalla parabola $y = x^2$ e la retta $y = ax + b: D(a, b) = \\{ (x, y) | x^2 ≤ y ≤ ax + b \\}$.
2021-06-15 00:49:18 -07:00
2022-03-04 19:46:29 +05:30
$L(a, b)$ è definito come il numero di punti del reticolo contenuti in $D(a, b)$. Per esempio, $L(1, 2) = 8$ e $L(2, -1) = 1$.
2021-06-15 00:49:18 -07:00
2022-03-04 19:46:29 +05:30
Definiamo anche $S(N)$ come la somma di $L(a, b)$ per tutte le coppie ($a$, $b$) per cui l'area di $D(a, b)$ è un numero razionale e $|a|,|b| ≤ N$.
2021-06-15 00:49:18 -07:00
2022-03-04 19:46:29 +05:30
Possiamo verificare che $S(5) = 344$ e $S(100) = 26\\,709\\,528$.
Trova $S({10}^{12})$. Dai la tua risposta $\bmod {10}^8$.
2021-06-15 00:49:18 -07:00
# --hints--
2022-03-04 19:46:29 +05:30
`latticePoints()` dovrebbe restituire `18224771` .
2021-06-15 00:49:18 -07:00
```js
2022-03-04 19:46:29 +05:30
assert.strictEqual(latticePoints(), 18224771);
2021-06-15 00:49:18 -07:00
```
# --seed--
## --seed-contents--
```js
2022-03-04 19:46:29 +05:30
function latticePoints() {
2021-06-15 00:49:18 -07:00
return true;
}
2022-03-04 19:46:29 +05:30
latticePoints();
2021-06-15 00:49:18 -07:00
```
# --solutions--
```js
// solution required
```