Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

989 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f5001000cf542c510013 Problem 403: Lattice points enclosed by parabola and line 5 302071 problem-403-lattice-points-enclosed-by-parabola-and-line

--description--

For integers a and b, we define D(a, b) as the domain enclosed by the parabola y = x2 and the line y = a·x + b:D(a, b) = { (x, y) | x2 ≤ y ≤ a·x + b }.

L(a, b) is defined as the number of lattice points contained in D(a, b). For example, L(1, 2) = 8 and L(2, -1) = 1.

We also define S(N) as the sum of L(a, b) for all the pairs (a, b) such that the area of D(a, b) is a rational number and |a|,|b| ≤ N. We can verify that S(5) = 344 and S(100) = 26709528.

Find S(1012). Give your answer mod 108.

--hints--

euler403() should return 18224771.

assert.strictEqual(euler403(), 18224771);

--seed--

--seed-contents--

function euler403() {

  return true;
}

euler403();

--solutions--

// solution required