freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-108-diophantine-rec...

49 lines
934 B
Markdown

---
id: 5900f3d91000cf542c50feeb
title: '問題 108: ディオファントス逆数 (1)'
challengeType: 1
forumTopicId: 301732
dashedName: problem-108-diophantine-reciprocals-i
---
# --description--
次の式の x, y, n は正の整数です。
$$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
`n` = 4 のとき、ちょうど 3 つの相異なる解があります。
$$\begin{align} & \frac{1}{5} + \frac{1}{20} = \frac{1}{4}\\\\
\\\\ & \frac{1}{6} + \frac{1}{12} = \frac{1}{4}\\\\
\\\\ & \frac{1}{8} + \frac{1}{8} = \frac{1}{4} \end{align}$$
相異なる解の数が 1000 を超える最小の `n` の値を求めなさい。
# --hints--
`diophantineOne()``180180` を返す必要があります。
```js
assert.strictEqual(diophantineOne(), 180180);
```
# --seed--
## --seed-contents--
```js
function diophantineOne() {
return true;
}
diophantineOne();
```
# --solutions--
```js
// solution required
```