56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
|
---
|
|||
|
id: 5900f44f1000cf542c50ff61
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 227: The Chase'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题227:大通
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description"> “追逐”是一个玩两个骰子和偶数玩家的游戏。 <p>球员坐在桌子旁;游戏开始于两个相对的玩家,每个玩家有一个骰子。在每个回合中,两个玩家都会掷骰子。如果一名球员掷出一个1,他将骰子传给左边的邻居;如果他掷出一个6,他就把骰子传给右边的邻居;否则,他会为下一个回合保留死亡。游戏结束时,一个玩家在滚动并通过后都有两个骰子;那个玩家失败了。 </p><p>在拥有100名玩家的游戏中,游戏持续的预期轮数是多少?将您的答案四舍五入到十位有效数字。 </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler227()</code>应返回3780.618622。
|
|||
|
testString: 'assert.strictEqual(euler227(), 3780.618622, "<code>euler227()</code> should return 3780.618622.");'
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler227() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler227();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|