2018-09-30 23:01:58 +01:00
---
id: 5900f44f1000cf542c50ff61
title: 'Problem 227: The Chase'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301870
2021-01-13 03:31:00 +01:00
dashedName: problem-227-the-chase
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
"The Chase" is a game played with two dice and an even number of players.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
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.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
In a game with 100 players, what is the expected number of turns the game lasts? Give your answer rounded to ten significant digits.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
`euler227()` should return 3780.618622.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert.strictEqual(euler227(), 3780.618622);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
function euler227() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
euler227();
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```