fix(curriculum): clean-up Project Euler 462-480 (#43069)
* fix: clean-up Project Euler 462-480 * fix: missing image extension * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@ -14,22 +14,24 @@ For this problem, a polygon can have collinear consecutive vertices. However, a
|
||||
|
||||
For example, only the first of the following is a polar polygon (the kernels of the second, third, and fourth do not strictly contain the origin, and the fifth does not have a kernel at all):
|
||||
|
||||
<img class="img-responsive center-block" alt="five example polygons" src="https://cdn.freecodecamp.org/curriculum/project-euler/polar-polygons.png" style="background-color: white; padding: 10px;">
|
||||
|
||||
Notice that the first polygon has three consecutive collinear vertices.
|
||||
|
||||
Let P(n) be the number of polar polygons such that the vertices (x, y) have integer coordinates whose absolute values are not greater than n.
|
||||
Let $P(n)$ be the number of polar polygons such that the vertices $(x, y)$ have integer coordinates whose absolute values are not greater than $n$.
|
||||
|
||||
Note that polygons should be counted as different if they have different set of edges, even if they enclose the same area. For example, the polygon with vertices \[(0,0),(0,3),(1,1),(3,0)] is distinct from the polygon with vertices \[(0,0),(0,3),(1,1),(3,0),(1,0)].
|
||||
Note that polygons should be counted as different if they have different set of edges, even if they enclose the same area. For example, the polygon with vertices [(0,0), (0,3), (1,1), (3,0)] is distinct from the polygon with vertices [(0,0), (0,3), (1,1), (3,0), (1,0)].
|
||||
|
||||
For example, P(1) = 131, P(2) = 1648531, P(3) = 1099461296175 and P(343) mod 1 000 000 007 = 937293740.
|
||||
For example, $P(1) = 131$, $P(2) = 1\\,648\\,531$, $P(3) = 1\\,099\\,461\\,296\\,175$ and $P(343)\bmod 1\\,000\\,000\\,007 = 937\\,293\\,740$.
|
||||
|
||||
Find P(713) mod 1 000 000 007.
|
||||
Find $P(7^{13})\bmod 1\\,000\\,000\\,007$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler465()` should return 585965659.
|
||||
`polarPolygons()` should return `585965659`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler465(), 585965659);
|
||||
assert.strictEqual(polarPolygons(), 585965659);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -37,12 +39,12 @@ assert.strictEqual(euler465(), 585965659);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler465() {
|
||||
function polarPolygons() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler465();
|
||||
polarPolygons();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user