freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-470-super-ramvok.ch...

56 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f5431000cf542c510055
challengeType: 5
title: 'Problem 470: Super Ramvok'
videoUrl: ''
localeTitle: 问题470超级拉姆沃克
---
## Description
<section id="description">考虑一下Ramvok的单一游戏 <p>设t表示游戏持续的最大转弯次数。如果t = 0则游戏立即结束。否则在每个回合i玩家掷骰子。在滚动之后如果玩家可以停止游戏并获得等于当前滚动值的奖励或者丢弃滚动并在下一轮再试一次。如果i = t则不能丢弃卷筒并且必须接受奖品。在比赛开始之前t由玩家选择然后玩家必须为某些常数c支付前期成本ct。对于c = 0可以选择t为无穷大前期成本为0。设Rdc是玩家从单次最佳玩法Ramvok游戏中获得的预期利润即净收益给定公平的d-die模具和成本常数c。例如R4,0.2= 2.65。假设玩家有足够的资金支付任何/所有前期费用。 </p><p>现在考虑一个超级拉姆沃克游戏: </p><p>在超级拉姆沃克拉姆沃克的比赛是反复播放但略有修改。每场比赛后骰子都会被改变。改变过程如下模具滚动一次如果得到的面部有可见的点则该面被改为空白。如果面部已经是空白则会将其更改回原始值。在进行改变之后可以开始另一场Ramvok游戏并且在这样的游戏中在每个回合中掷骰子被滚动直到出现具有其值的面部。玩家知道哪些面是空白的哪些面不是。一旦模具的所有面都空白超级拉姆沃克的游戏结束。 </p><p>设Sdc是玩家从Super Ramvok最佳玩游戏中获得的预期利润给出一个公平的d-side模具开始所有边都可见并且成本常数c。例如S6,1= 208.3。 </p><p>设Fn=Σ4≤d≤nΣ0≤c≤nSdc</p><p>计算F20四舍五入到最接近的整数。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler470()</code>应该返回147668794。
testString: 'assert.strictEqual(euler470(), 147668794, "<code>euler470()</code> should return 147668794.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler470() {
// Good luck!
return true;
}
euler470();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>