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,12 +1,12 @@
|
||||
---
|
||||
id: 5900f4551000cf542c50ff67
|
||||
challengeType: 5
|
||||
title: 'Problem 232: The Race'
|
||||
challengeType: 5
|
||||
forumTopicId: 301876
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
Two players share an unbiased coin and take it in turns to play "The Race". On Player 1's turn, he tosses the coin once: if it comes up Heads, he scores one point; if it comes up Tails, he scores nothing. On Player 2's turn, she chooses a positive integer T and tosses the coin T times: if it comes up all Heads, she scores 2T-1 points; otherwise, she scores nothing. Player 1 goes first. The winner is the first to 100 or more points.
|
||||
|
||||
On each turn Player 2 selects the number, T, of coin tosses that maximises the probability of her winning.
|
||||
@ -14,29 +14,18 @@ On each turn Player 2 selects the number, T, of coin tosses that maximises the p
|
||||
What is the probability that Player 2 wins?
|
||||
|
||||
Give your answer rounded to eight decimal places in the form 0.abcdefgh .
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>euler232()</code> should return 0.83648556.
|
||||
testString: assert.strictEqual(euler232(), 0.83648556);
|
||||
`euler232()` should return 0.83648556.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler232(), 0.83648556);
|
||||
```
|
||||
|
||||
</section>
|
||||
# --seed--
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
<div id='js-seed'>
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler232() {
|
||||
@ -47,17 +36,8 @@ function euler232() {
|
||||
euler232();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user