2021-06-15 00:49:18 -07:00
|
|
|
---
|
|
|
|
id: 5900f4ae1000cf542c50ffbf
|
2022-03-01 21:39:26 +05:30
|
|
|
title: 'Problema 320: Fattoriali divisibili da un numero intero enorme'
|
2021-06-15 00:49:18 -07:00
|
|
|
challengeType: 5
|
|
|
|
forumTopicId: 301977
|
|
|
|
dashedName: problem-320-factorials-divisible-by-a-huge-integer
|
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
Sia $N(i)$ sia il più piccolo numero intero $n$ tale che $n!$ sia divisibile per $(i!)^{1234567890}$
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
Sia $S(u) = \sum N(i)$ per $10 ≤ i ≤ u$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
$S(1000)=614\\,538\\,266\\,565\\,663$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
Trova $S(1\\,000\\,000)\bmod {10}^{18}$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
`divisibleByHugeInteger()` dovrebbe restituire `278157919195482660`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
```js
|
2022-03-01 21:39:26 +05:30
|
|
|
assert.strictEqual(divisibleByHugeInteger(), 278157919195482660);
|
2021-06-15 00:49:18 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
2022-03-01 21:39:26 +05:30
|
|
|
function divisibleByHugeInteger() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2022-03-01 21:39:26 +05:30
|
|
|
divisibleByHugeInteger();
|
2021-06-15 00:49:18 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|