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,64 +1,35 @@
---
id: 5900f4d21000cf542c50ffe5
challengeType: 5
title: 'Problem 358: Cyclic numbers'
challengeType: 5
forumTopicId: 302018
---
## Description
<section id='description'>
# --description--
A cyclic number with n digits has a very interesting property:
When it is multiplied by 1, 2, 3, 4, ... n, all the products have exactly the same digits, in the same order, but rotated in a circular fashion!
The smallest cyclic number is the 6-digit number 142857 : 142857 × 1 = 142857 142857 × 2 = 285714 142857 × 3 = 428571 142857 × 4 = 571428 142857 × 5 = 714285 142857 × 6 = 857142
The smallest cyclic number is the 6-digit number 142857 :
142857 × 1 = 142857
142857 × 2 = 285714
142857 × 3 = 428571
142857 × 4 = 571428
142857 × 5 = 714285
142857 × 6 = 857142
The next cyclic number is 0588235294117647 with 16 digits :
0588235294117647 × 1 = 0588235294117647
0588235294117647 × 2 = 1176470588235294
0588235294117647 × 3 = 1764705882352941
...
0588235294117647 × 16 = 9411764705882352
The next cyclic number is 0588235294117647 with 16 digits : 0588235294117647 × 1 = 0588235294117647 0588235294117647 × 2 = 1176470588235294 0588235294117647 × 3 = 1764705882352941 ... 0588235294117647 × 16 = 9411764705882352
Note that for cyclic numbers, leading zeros are important.
There is only one cyclic number for which, the eleven leftmost digits are 00000000137 and the five rightmost digits are 56789 (i.e., it has the form 00000000137...56789 with an unknown number of digits in the middle). Find the sum of all its digits.
</section>
## Instructions
<section id='instructions'>
# --hints--
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler358()</code> should return 3284144505.
testString: assert.strictEqual(euler358(), 3284144505);
`euler358()` should return 3284144505.
```js
assert.strictEqual(euler358(), 3284144505);
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
## --seed-contents--
```js
function euler358() {
@ -69,17 +40,8 @@ function euler358() {
euler358();
```
</div>
</section>
## Solution
<section id='solution'>
# --solutions--
```js
// solution required
```
</section>