2021-06-15 07:49:18 +00:00
|
|
|
---
|
|
|
|
id: 5900f5471000cf542c510059
|
2022-02-19 14:41:19 +00:00
|
|
|
title: 'Problema 474: Ultime cifre di divisori'
|
2021-06-15 07:49:18 +00:00
|
|
|
challengeType: 5
|
|
|
|
forumTopicId: 302151
|
|
|
|
dashedName: problem-474-last-digits-of-divisors
|
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
Per un numero intero positivo $n$ e cifre $d$ definiamo $F(n, d)$ come il numero dei divisori di $n$ le cui ultime cifre sono pari a $d$.
|
2021-06-15 07:49:18 +00:00
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
Per esempio, $F(84, 4) = 3$. Tra i divisori di 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84), tre di loro (4, 14, 84) hanno l'ultima cifra 4.
|
2021-06-15 07:49:18 +00:00
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
Possiamo anche verificare che $F(12!, 12) = 11$ e $F(50!, 123) = 17\\,888$.
|
2021-06-15 07:49:18 +00:00
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
Trova $F({10}^6!, 65\\,432) \text{ modulo } ({10}^{16} + 61)$.
|
2021-06-15 07:49:18 +00:00
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
`lastDigitsOfDivisors()` dovrebbe restituire `9690646731515010`.
|
2021-06-15 07:49:18 +00:00
|
|
|
|
|
|
|
```js
|
2022-02-19 14:41:19 +00:00
|
|
|
assert.strictEqual(lastDigitsOfDivisors(), 9690646731515010);
|
2021-06-15 07:49:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
2022-02-19 14:41:19 +00:00
|
|
|
function lastDigitsOfDivisors() {
|
2021-06-15 07:49:18 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2022-02-19 14:41:19 +00:00
|
|
|
lastDigitsOfDivisors();
|
2021-06-15 07:49:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|