2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4391000cf542c50ff4c
|
|
|
|
title: 'Problem 205: Dice Game'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 301846
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-205-dice-game
|
2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --description--
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4.
|
2020-11-27 18:02:05 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
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
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --hints--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
`euler205()` should return 0.5731441.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
|
|
|
assert.strictEqual(euler205(), 0.5731441);
|
2018-09-30 22:01:58 +00:00
|
|
|
```
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --seed--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
## --seed-contents--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
function euler205() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler205();
|
|
|
|
```
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --solutions--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|