freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-372-pencils-of-rays...

62 lines
935 B
Markdown
Raw Normal View History

---
id: 5900f4e11000cf542c50fff3
challengeType: 5
title: 'Problem 372: Pencils of rays'
---
## Description
<section id='description'>
Let R(M, N) be the number of lattice points (x, y) which satisfy M<xN, M<yN and is odd.
We can verify that R(0, 100) = 3019 and R(100, 10000) = 29750422.
Find R(2·106, 109).
Note: represents the floor function.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler372()</code> should return 301450082318807040.
testString: assert.strictEqual(euler372(), 301450082318807040, '<code>euler372()</code> should return 301450082318807040.');
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler372() {
// Good luck!
return true;
}
euler372();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>