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

903 B

id title challengeType forumTopicId dashedName
5900f3d91000cf542c50feeb Problema 108: Diofantinos recíprocos I 5 301732 problem-108-diophantine-reciprocals-i

--description--

Na equação a seguir, x, y e n são inteiros positivos.

\frac{1}{x} + \frac{1}{y} = \frac{1}{n}

Para n = 4, há exatamente três soluções distintas:

\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}$$

Qual é o menor valor de `n` para o qual o número de soluções distintas excede um mil?

# --hints--

`diophantineOne()` deve retornar `180180`.

```js
assert.strictEqual(diophantineOne(), 180180);
```

# --seed--

## --seed-contents--

```js
function diophantineOne() {

  return true;
}

diophantineOne();
```

# --solutions--

```js
// solution required
```