2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f3f11000cf542c50ff03
|
2022-02-28 13:29:21 +05:30
|
|
|
|
title: 'Problema 132: Grandi fattori repunit'
|
2021-06-15 00:49:18 -07:00
|
|
|
|
challengeType: 5
|
|
|
|
|
forumTopicId: 301760
|
|
|
|
|
dashedName: problem-132-large-repunit-factors
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2022-02-28 13:29:21 +05:30
|
|
|
|
Un numero costituito interamente da uni è chiamato un repunit (ripetizione di uno). Definiremo $R(k)$ in modo che sia una repunit di lunghezza $k$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-02-28 13:29:21 +05:30
|
|
|
|
Ad esempio, $R(10) = 1111111111 = 11 × 41 × 271 × 9091$, e la somma di questi fattori primi è 9414.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-02-28 13:29:21 +05:30
|
|
|
|
Trova la somma dei primi quaranta fattori primi di $R({10}^9)$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2022-02-28 13:29:21 +05:30
|
|
|
|
`largeRepunitFactors()` dovrebbe restituire `843296`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2022-02-28 13:29:21 +05:30
|
|
|
|
assert.strictEqual(largeRepunitFactors(), 843296);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2022-02-28 13:29:21 +05:30
|
|
|
|
function largeRepunitFactors() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-28 13:29:21 +05:30
|
|
|
|
largeRepunitFactors();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|