2021-06-15 00:49:18 -07:00
---
id: 5900f4e11000cf542c50fff3
2022-03-02 20:56:06 +05:30
title: 'Problema 372: Raggi di matite'
2021-06-15 00:49:18 -07:00
challengeType: 5
forumTopicId: 302034
dashedName: problem-372-pencils-of-rays
---
# --description--
2022-03-02 20:56:06 +05:30
Sia $R(M, N)$ il numero di punti di reticolo ($x$, $y$) che soddisfa $M \lt x \le N$, $M \lt y \le N$ e $\left\lfloor\frac{y^2}{x^2}\right\rfloor$ è dispari.
2021-06-15 00:49:18 -07:00
2022-03-02 20:56:06 +05:30
Possiamo verificare che $R(0, 100) = 3\\,019$ e $R(100, 10\\,000) = 29\\,750\\,422$.
Trova $R(2 \times {10}^6, {10}^9)$.
**Nota:** $\lfloor x\rfloor$ è la funzione che arrotonda verso il basso.
2021-06-15 00:49:18 -07:00
# --hints--
2022-03-02 20:56:06 +05:30
`pencilsOfRays()` dovrebbe restituire `301450082318807040` .
2021-06-15 00:49:18 -07:00
```js
2022-03-02 20:56:06 +05:30
assert.strictEqual(pencilsOfRays(), 301450082318807040);
2021-06-15 00:49:18 -07:00
```
# --seed--
## --seed-contents--
```js
2022-03-02 20:56:06 +05:30
function pencilsOfRays() {
2021-06-15 00:49:18 -07:00
return true;
}
2022-03-02 20:56:06 +05:30
pencilsOfRays();
2021-06-15 00:49:18 -07:00
```
# --solutions--
```js
// solution required
```