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,45 +1,29 @@
---
id: 5900f4fa1000cf542c51000d
challengeType: 5
title: 'Problem 398: Cutting rope'
challengeType: 5
forumTopicId: 302063
---
## Description
<section id='description'>
# --description--
Inside a rope of length n, n-1 points are placed with distance 1 from each other and from the endpoints. Among these points, we choose m-1 points at random and cut the rope at these points to create m segments.
Let E(n, m) be the expected length of the second-shortest segment. For example, E(3, 2) = 2 and E(8, 3) = 16/7. Note that if multiple segments have the same shortest length the length of the second-shortest segment is defined as the same as the shortest length.
Let E(n, m) be the expected length of the second-shortest segment.
For example, E(3, 2) = 2 and E(8, 3) = 16/7.
Note that if multiple segments have the same shortest length the length of the second-shortest segment is defined as the same as the shortest length.
Find E(107, 100). Give your answer rounded to 5 decimal places behind the decimal point.
# --hints--
Find E(107, 100).
Give your answer rounded to 5 decimal places behind the decimal point.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler398()</code> should return 2010.59096.
testString: assert.strictEqual(euler398(), 2010.59096);
`euler398()` should return 2010.59096.
```js
assert.strictEqual(euler398(), 2010.59096);
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
## --seed-contents--
```js
function euler398() {
@ -50,17 +34,8 @@ function euler398() {
euler398();
```
</div>
</section>
## Solution
<section id='solution'>
# --solutions--
```js
// solution required
```
</section>