Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-388-distinct-lines.english.md
Oliver Eyton-Williams bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

1002 B

id, challengeType, title, forumTopicId
id challengeType title forumTopicId
5900f4f11000cf542c510002 5 Problem 388: Distinct Lines 302052

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) = 831909254469114121.

Find D(1010). Give as your answer the first nine digits followed by the last nine digits.

Instructions

Tests

tests:
  - text: <code>euler388()</code> should return 831907372805130000.
    testString: assert.strictEqual(euler388(), 831907372805130000);

Challenge Seed

function euler388() {
  // Good luck!
  return true;
}

euler388();

Solution

// solution required