2022-01-21 01:00:18 +05:30
|
|
|
---
|
|
|
|
id: 5900f5331000cf542c510045
|
2022-01-22 20:38:20 +05:30
|
|
|
title: '問題 454: ディオファントス逆数 (3)'
|
2022-01-21 01:00:18 +05:30
|
|
|
challengeType: 5
|
|
|
|
forumTopicId: 302127
|
|
|
|
dashedName: problem-454-diophantine-reciprocals-iii
|
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
2022-01-22 20:38:20 +05:30
|
|
|
次の式の $x$, $y$, $n$ は正の整数です。
|
2022-01-21 01:00:18 +05:30
|
|
|
|
|
|
|
$$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
|
|
|
|
|
2022-01-22 20:38:20 +05:30
|
|
|
上限が $L$ のとき、$x < y ≤ L$ を満たす解の個数を $F(L)$ とします。
|
2022-01-21 01:00:18 +05:30
|
|
|
|
2022-01-22 20:38:20 +05:30
|
|
|
$F(15) = 4$, $F(1000) = 1069$ であることを確認できます。
|
2022-01-21 01:00:18 +05:30
|
|
|
|
2022-01-22 20:38:20 +05:30
|
|
|
$F({10}^{12})$ を求めなさい。
|
2022-01-21 01:00:18 +05:30
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2022-01-22 20:38:20 +05:30
|
|
|
`diophantineReciprocalsThree()` は `5435004633092` を返す必要があります。
|
2022-01-21 01:00:18 +05:30
|
|
|
|
|
|
|
```js
|
|
|
|
assert.strictEqual(diophantineReciprocalsThree(), 5435004633092);
|
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
|
|
|
function diophantineReciprocalsThree() {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
diophantineReciprocalsThree();
|
|
|
|
```
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|