freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-110-diophantine-rec...

47 lines
1.0 KiB
Markdown
Raw Normal View History

---
id: 5900f3db1000cf542c50feed
title: 'Problem 110: Diophantine Reciprocals II'
challengeType: 5
forumTopicId: 301735
dashedName: problem-110-diophantine-reciprocals-ii
---
# --description--
In the following equation x, y, and n are positive integers.
$$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
It can be verified that when `n` = 1260 there are 113 distinct solutions and this is the least value of `n` for which the total number of distinct solutions exceeds one hundred.
What is the least value of `n` for which the number of distinct solutions exceeds four million?
**Note:** This problem is a much more difficult version of Problem 108 and as it is well beyond the limitations of a brute force approach it requires a clever implementation.
# --hints--
`diophantineTwo()` should return `9350130049860600`.
```js
assert.strictEqual(diophantineTwo(), 9350130049860600);
```
# --seed--
## --seed-contents--
```js
function diophantineTwo() {
return true;
}
diophantineTwo();
```
# --solutions--
```js
// solution required
```