56 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | ||
| id: 5900f4551000cf542c50ff67
 | ||
| challengeType: 5
 | ||
| title: 'Problem 232: The Race'
 | ||
| videoUrl: ''
 | ||
| localeTitle: 问题232:比赛
 | ||
| ---
 | ||
| 
 | ||
| ## Description
 | ||
| <section id="description">两名玩家分享一个无偏见的硬币并轮流玩“The Race”。在玩家1的回合中,他扔了一次硬币:如果它出现在Heads,他得分为1分;如果它出现Tails,他什么都没得分。在玩家2的回合中,她选择一个正整数T并将硬币投掷T次:如果它出现在所有的头上,她得到2T-1分;否则,她没有得分。玩家1排在第一位。获胜者是第一个达到100分或更多分。 <p>在每次转弯时,玩家2选择硬币投掷的数量T,以最大化她获胜的概率。 </p><p>玩家2获胜的概率是多少? </p><p>将您的答案四舍五入到0.abcdefgh形式的八位小数。 </p></section>
 | ||
| 
 | ||
| ## Instructions
 | ||
| <section id="instructions">
 | ||
| </section>
 | ||
| 
 | ||
| ## Tests
 | ||
| <section id='tests'>
 | ||
| 
 | ||
| ```yml
 | ||
| tests:
 | ||
|   - text: <code>euler232()</code>应返回0.83648556。
 | ||
|     testString: 'assert.strictEqual(euler232(), 0.83648556, "<code>euler232()</code> should return 0.83648556.");'
 | ||
| 
 | ||
| ```
 | ||
| 
 | ||
| </section>
 | ||
| 
 | ||
| ## Challenge Seed
 | ||
| <section id='challengeSeed'>
 | ||
| 
 | ||
| <div id='js-seed'>
 | ||
| 
 | ||
| ```js
 | ||
| function euler232() {
 | ||
|   // Good luck!
 | ||
|   return true;
 | ||
| }
 | ||
| 
 | ||
| euler232();
 | ||
| 
 | ||
| ```
 | ||
| 
 | ||
| </div>
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| </section>
 | ||
| 
 | ||
| ## Solution
 | ||
| <section id='solution'>
 | ||
| 
 | ||
| ```js
 | ||
| // solution required
 | ||
| ```
 | ||
| </section>
 |