Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
This commit is contained in:
committed by
GitHub
parent
a07f84c8ec
commit
0bd52f8bd1
@ -1,41 +1,33 @@
|
||||
---
|
||||
id: 5900f4ca1000cf542c50ffdc
|
||||
challengeType: 5
|
||||
title: 'Problem 349: Langton''s ant'
|
||||
challengeType: 5
|
||||
forumTopicId: 302008
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
An ant moves on a regular grid of squares that are coloured either black or white.
|
||||
|
||||
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 white square, it flips the color of the square to black, rotates 90 degrees clockwise and moves forward one square.
|
||||
|
||||
\- 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 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 1018 moves of the ant?
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>euler349()</code> should return 115384615384614940.
|
||||
testString: assert.strictEqual(euler349(), 115384615384614940);
|
||||
`euler349()` should return 115384615384614940.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler349(), 115384615384614940);
|
||||
```
|
||||
|
||||
</section>
|
||||
# --seed--
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
<div id='js-seed'>
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler349() {
|
||||
@ -46,17 +38,8 @@ function euler349() {
|
||||
euler349();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user