fix(curriculum): clean-up Project Euler 341-360 (#42998)
* fix: clean-up Project Euler 341-360 * fix: improve wording Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> * 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>
This commit is contained in:
@ -12,18 +12,17 @@ An ant moves on a regular grid of squares that are coloured either black or whit
|
||||
|
||||
The ant is always oriented in one of the cardinal directions (left, right, up or down) and moves from square to adjacent square according to the following rules:
|
||||
|
||||
\- if it is on a black square, it flips the color of the square to white, rotates 90 degrees counterclockwise and moves forward one square.
|
||||
- if it is on a black square, it flips the color of the square to white, rotates 90° counterclockwise and moves forward one square.
|
||||
- if it is on a white square, it flips the color of the square to black, rotates 90° clockwise and moves forward one square.
|
||||
|
||||
\- if it is on a white square, it flips the color of the square to black, rotates 90 degrees clockwise and moves forward one square.
|
||||
|
||||
Starting with a grid that is entirely white, how many squares are black after 10<sup>18</sup> moves of the ant?
|
||||
Starting with a grid that is entirely white, how many squares are black after ${10}^{18}$ moves of the ant?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler349()` should return 115384615384614940.
|
||||
`langtonsAnt()` should return `115384615384614940`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler349(), 115384615384614940);
|
||||
assert.strictEqual(langtonsAnt(), 115384615384614940);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -31,12 +30,12 @@ assert.strictEqual(euler349(), 115384615384614940);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler349() {
|
||||
function langtonsAnt() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler349();
|
||||
langtonsAnt();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user