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

909 B

id title challengeType forumTopicId dashedName
5900f4f11000cf542c510002 問題 388: 相異なる線 5 302052 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 を返す必要があります。

assert.strictEqual(distinctLines(), 831907372805130000);

--seed--

--seed-contents--

function distinctLines() {

  return true;
}

distinctLines();

--solutions--

// solution required