43 lines
730 B
Markdown
43 lines
730 B
Markdown
---
|
||
id: 5900f3f11000cf542c50ff03
|
||
title: '問題 132:大純元數因子'
|
||
challengeType: 5
|
||
forumTopicId: 301760
|
||
dashedName: problem-132-large-repunit-factors
|
||
---
|
||
|
||
# --description--
|
||
|
||
完全由 1 組成的數字稱爲純元數(repunit)。 我們定義 $R(k)$ 爲長度 $k$ 的純元數。
|
||
|
||
例如 $R(10) = 1111111111 = 11 × 41 × 271 × 9091$,則其素數因子的和爲 9414。
|
||
|
||
求 $R({10}^9)$ 的前 40 個素數因子的和。
|
||
|
||
# --hints--
|
||
|
||
`largeRepunitFactors()` 應該返回 `843296`。
|
||
|
||
```js
|
||
assert.strictEqual(largeRepunitFactors(), 843296);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function largeRepunitFactors() {
|
||
|
||
return true;
|
||
}
|
||
|
||
largeRepunitFactors();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|