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,50 +1,57 @@
---
id: 5900f3711000cf542c50fe84
challengeType: 5
title: 'Problem 5: Smallest multiple'
challengeType: 5
forumTopicId: 302160
---
## Description
<section id='description'>
# --description--
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to `n`?
</section>
# --hints--
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>smallestMult(5)</code> should return a number.
testString: assert(typeof smallestMult(5) === 'number');
- text: <code>smallestMult(5)</code> should return 60.
testString: assert.strictEqual(smallestMult(5), 60);
- text: <code>smallestMult(7)</code> should return 420.
testString: assert.strictEqual(smallestMult(7), 420);
- text: <code>smallestMult(10)</code> should return 2520.
testString: assert.strictEqual(smallestMult(10), 2520);
- text: <code>smallestMult(13)</code> should return 360360.
testString: assert.strictEqual(smallestMult(13), 360360);
- text: <code>smallestMult(20)</code> should return 232792560.
testString: assert.strictEqual(smallestMult(20), 232792560);
`smallestMult(5)` should return a number.
```js
assert(typeof smallestMult(5) === 'number');
```
</section>
`smallestMult(5)` should return 60.
## Challenge Seed
<section id='challengeSeed'>
```js
assert.strictEqual(smallestMult(5), 60);
```
<div id='js-seed'>
`smallestMult(7)` should return 420.
```js
assert.strictEqual(smallestMult(7), 420);
```
`smallestMult(10)` should return 2520.
```js
assert.strictEqual(smallestMult(10), 2520);
```
`smallestMult(13)` should return 360360.
```js
assert.strictEqual(smallestMult(13), 360360);
```
`smallestMult(20)` should return 232792560.
```js
assert.strictEqual(smallestMult(20), 232792560);
```
# --seed--
## --seed-contents--
```js
function smallestMult(n) {
@ -55,15 +62,7 @@ function smallestMult(n) {
smallestMult(20);
```
</div>
</section>
## Solution
<section id='solution'>
# --solutions--
```js
function smallestMult(n){
@ -81,5 +80,3 @@ function smallestMult(n){
return result;
}
```
</section>