63 lines
1.0 KiB
Markdown
63 lines
1.0 KiB
Markdown
---
|
|
id: 5900f4391000cf542c50ff4c
|
|
challengeType: 5
|
|
title: 'Problem 205: Dice Game'
|
|
forumTopicId: 301846
|
|
---
|
|
|
|
## Description
|
|
<section id='description'>
|
|
Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4.
|
|
Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6.
|
|
|
|
Peter and Colin roll their dice and compare totals: the highest total wins. The result is a draw if the totals are equal.
|
|
|
|
What is the probability that Pyramidal Pete beats Cubic Colin? Give your answer rounded to seven decimal places in the form 0.abcdefg
|
|
</section>
|
|
|
|
## Instructions
|
|
<section id='instructions'>
|
|
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: <code>euler205()</code> should return 0.5731441.
|
|
testString: assert.strictEqual(euler205(), 0.5731441);
|
|
|
|
```
|
|
|
|
</section>
|
|
|
|
## Challenge Seed
|
|
<section id='challengeSeed'>
|
|
|
|
<div id='js-seed'>
|
|
|
|
```js
|
|
function euler205() {
|
|
// Good luck!
|
|
return true;
|
|
}
|
|
|
|
euler205();
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
```js
|
|
// solution required
|
|
```
|
|
|
|
</section>
|