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,43 +1,29 @@
|
||||
---
|
||||
id: 5900f44f1000cf542c50ff61
|
||||
challengeType: 5
|
||||
title: 'Problem 227: The Chase'
|
||||
challengeType: 5
|
||||
forumTopicId: 301870
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
"The Chase" is a game played with two dice and an even number of players.
|
||||
|
||||
The players sit around a table; the game begins with two opposite players having one die each. On each turn, the two players with a die roll it.
|
||||
If a player rolls a 1, he passes the die to his neighbour on the left; if he rolls a 6, he passes the die to his neighbour on the right; otherwise, he keeps the die for the next turn.
|
||||
The game ends when one player has both dice after they have been rolled and passed; that player has then lost.
|
||||
The players sit around a table; the game begins with two opposite players having one die each. On each turn, the two players with a die roll it. If a player rolls a 1, he passes the die to his neighbour on the left; if he rolls a 6, he passes the die to his neighbour on the right; otherwise, he keeps the die for the next turn. The game ends when one player has both dice after they have been rolled and passed; that player has then lost.
|
||||
|
||||
In a game with 100 players, what is the expected number of turns the game lasts?
|
||||
Give your answer rounded to ten significant digits.
|
||||
</section>
|
||||
In a game with 100 players, what is the expected number of turns the game lasts? Give your answer rounded to ten significant digits.
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>euler227()</code> should return 3780.618622.
|
||||
testString: assert.strictEqual(euler227(), 3780.618622);
|
||||
`euler227()` should return 3780.618622.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler227(), 3780.618622);
|
||||
```
|
||||
|
||||
</section>
|
||||
# --seed--
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
<div id='js-seed'>
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler227() {
|
||||
@ -48,17 +34,8 @@ function euler227() {
|
||||
euler227();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user