2022-01-20 19:30:18 +00:00
|
|
|
---
|
|
|
|
id: 5900f4c71000cf542c50ffd8
|
2022-01-22 15:08:20 +00:00
|
|
|
title: '問題 346: 強力なレピュニット数'
|
2022-01-20 19:30:18 +00:00
|
|
|
challengeType: 5
|
|
|
|
forumTopicId: 302005
|
|
|
|
dashedName: problem-346-strong-repunits
|
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
2022-01-22 15:08:20 +00:00
|
|
|
7 という数は特殊です。2 進数では 111、6 進数では 11 と表されるからです ($7_{10} = {11}_6 = {111}_2$)。 つまり、7 は少なくとも 2 つの基数 ($b > 1$) のレピュニット数です。
|
2022-01-20 19:30:18 +00:00
|
|
|
|
2022-01-22 15:08:20 +00:00
|
|
|
このような性質を持つ正の整数を「強力なレピュニット数」と呼ぶことにします。 50 未満の強力なレピュニット数は {1, 7, 13, 15, 21, 31, 40, 43} の 8 つであることを確認できます。 さらに、1000 未満の強力なレピュニット数の総和は 15864 です。
|
2022-01-20 19:30:18 +00:00
|
|
|
|
2022-01-22 15:08:20 +00:00
|
|
|
${10}^{12}$ 未満の強力なレピュニット数の総和を求めなさい。
|
2022-01-20 19:30:18 +00:00
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2022-01-22 15:08:20 +00:00
|
|
|
`strongRepunits()` は `336108797689259260` を返す必要があります
|
2022-01-20 19:30:18 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
assert.strictEqual(strongRepunits(), 336108797689259260);
|
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
|
|
|
function strongRepunits() {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
strongRepunits();
|
|
|
|
```
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|