Files
gikf 7d9496e52c fix(curriculum): clean-up Project Euler 361-380 (#43002)
* fix: clean-up Project Euler 361-380

* fix: improve wording

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* fix: remove unnecessary paragraph

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-29 12:48:17 -07:00

805 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4e11000cf542c50fff3 Problem 372: Pencils of rays 5 302034 problem-372-pencils-of-rays

--description--

Let R(M, N) be the number of lattice points (x, y) which satisfy M \lt x \le N, M \lt y \le N and \left\lfloor\frac{y^2}{x^2}\right\rfloor is odd.

We can verify that R(0, 100) = 3\\,019 and R(100, 10\\,000) = 29\\,750\\,422.

Find R(2 \times {10}^6, {10}^9).

Note: \lfloor x\rfloor represents the floor function.

--hints--

pencilsOfRays() should return 301450082318807040.

assert.strictEqual(pencilsOfRays(), 301450082318807040);

--seed--

--seed-contents--

function pencilsOfRays() {

  return true;
}

pencilsOfRays();

--solutions--

// solution required