freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-388-distinct-lines.md

45 lines
838 B
Markdown

---
id: 5900f4f11000cf542c510002
title: 'Problem 388: Distinct Lines'
challengeType: 5
forumTopicId: 302052
dashedName: problem-388-distinct-lines
---
# --description--
Consider all lattice points ($a$, $b$, $c$) with $0 ≤ a, b, c ≤ N$.
From the origin $O(0, 0, 0)$ all lines are drawn to the other lattice points. Let $D(N)$ be the number of distinct such lines.
You are given that $D(1\\,000\\,000) = 831\\,909\\,254\\,469\\,114\\,121$.
Find $D({10}^{10})$. Give as your answer the first nine digits followed by the last nine digits.
# --hints--
`distinctLines()` should return `831907372805130000`.
```js
assert.strictEqual(distinctLines(), 831907372805130000);
```
# --seed--
## --seed-contents--
```js
function distinctLines() {
return true;
}
distinctLines();
```
# --solutions--
```js
// solution required
```