Feat: add new Markdown parser (#39800)

and change all the challenges to new `md` format.
This commit is contained in:
Oliver Eyton-Williams
2020-11-27 19:02:05 +01:00
committed by GitHub
parent a07f84c8ec
commit 0bd52f8bd1
2580 changed files with 113436 additions and 111979 deletions

View File

@ -1,41 +1,29 @@
---
id: 5900f4841000cf542c50ff97
challengeType: 5
title: 'Problem 280: Ant and seeds'
challengeType: 5
forumTopicId: 301931
---
## Description
<section id='description'>
# --description--
A laborious ant walks randomly on a 5x5 grid. The walk starts from the central square. At each step, the ant moves to an adjacent square at random, without leaving the grid; thus there are 2, 3 or 4 possible moves at each step depending on the ant's position.
At the start of the walk, a seed is placed on each square of the lower row. When the ant isn't carrying a seed and reaches a square of the lower row containing a seed, it will start to carry the seed. The ant will drop the seed on the first empty square of the upper row it eventually reaches.
What's the expected number of steps until all seeds have been dropped in the top row?
Give your answer rounded to 6 decimal places.
</section>
What's the expected number of steps until all seeds have been dropped in the top row? Give your answer rounded to 6 decimal places.
## Instructions
<section id='instructions'>
# --hints--
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler280()</code> should return 430.088247.
testString: assert.strictEqual(euler280(), 430.088247);
`euler280()` should return 430.088247.
```js
assert.strictEqual(euler280(), 430.088247);
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
## --seed-contents--
```js
function euler280() {
@ -46,17 +34,8 @@ function euler280() {
euler280();
```
</div>
</section>
## Solution
<section id='solution'>
# --solutions--
```js
// solution required
```
</section>