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

45 lines
909 B
Markdown
Raw Normal View History

---
id: 5900f4f11000cf542c510002
title: '問題 388: 相異なる線'
challengeType: 5
forumTopicId: 302052
dashedName: problem-388-distinct-lines
---
# --description--
$0 ≤ a, b, c ≤ N$ を満たすすべての格子点 ($a$, $b$, $c$) について考えます。
すべての線は、原点 $O(0, 0, 0)$ から他の格子点まで引かれます。 相異なるこのような線の数を $D(N)$ とします。
$D(1\\,000\\,000) = 831\\,909\\,254\\,469\\,114\\,121$ です。
$D({10}^{10})$ を求めなさい。 回答は、上位 9 桁に続けて下位 9 桁を示すこと。
# --hints--
`distinctLines()``831907372805130000` を返す必要があります。
```js
assert.strictEqual(distinctLines(), 831907372805130000);
```
# --seed--
## --seed-contents--
```js
function distinctLines() {
return true;
}
distinctLines();
```
# --solutions--
```js
// solution required
```