fix(curriculum): clean-up Project Euler 201-220 (#42826)

* fix: clean-up Project Euler 201-220

* 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:
gikf
2021-07-15 09:20:31 +02:00
committed by GitHub
parent 505c3b7c6c
commit eef1805fe6
20 changed files with 254 additions and 156 deletions

View File

@ -10,18 +10,20 @@ dashedName: problem-202-laserbeam
Three mirrors are arranged in the shape of an equilateral triangle, with their reflective surfaces pointing inwards. There is an infinitesimal gap at each vertex of the triangle through which a laser beam may pass.
Label the vertices A, B and C. There are 2 ways in which a laser beam may enter vertex C, bounce off 11 surfaces, then exit through the same vertex: one way is shown below; the other is the reverse of that.
Label the vertices $A$, $B$ and $C$. There are 2 ways in which a laser beam may enter vertex $C$, bounce off 11 surfaces, then exit through the same vertex: one way is shown below; the other is the reverse of that.
There are 80840 ways in which a laser beam may enter vertex C, bounce off 1000001 surfaces, then exit through the same vertex.
<img class="img-responsive center-block" alt="one way in which laser beam may enter vertex C, bounce off 11 surfaces and exit through the same vertex" src="https://cdn.freecodecamp.org/curriculum/project-euler/laserbeam.gif" style="background-color: white; padding: 10px;">
In how many ways can a laser beam enter at vertex C, bounce off 12017639147 surfaces, then exit through the same vertex?
There are 80840 ways in which a laser beam may enter vertex $C$, bounce off 1000001 surfaces, then exit through the same vertex.
In how many ways can a laser beam enter at vertex $C$, bounce off 12017639147 surfaces, then exit through the same vertex?
# --hints--
`euler202()` should return 1209002624.
`laserbeam()` should return `1209002624`.
```js
assert.strictEqual(euler202(), 1209002624);
assert.strictEqual(laserbeam(), 1209002624);
```
# --seed--
@ -29,12 +31,12 @@ assert.strictEqual(euler202(), 1209002624);
## --seed-contents--
```js
function euler202() {
function laserbeam() {
return true;
}
euler202();
laserbeam();
```
# --solutions--