chore(i8n,learn): processed translations

This commit is contained in:
Crowdin Bot
2021-02-06 04:42:36 +00:00
committed by Mrugesh Mohapatra
parent 15047f2d90
commit e5c44a3ae5
3274 changed files with 172122 additions and 14164 deletions

View File

@ -1,28 +1,36 @@
---
id: 5900f5021000cf542c510015
title: 问题406猜猜游戏
title: 'Problem 406: Guessing Game'
challengeType: 5
videoUrl: ''
forumTopicId: 302074
dashedName: problem-406-guessing-game
---
# --description--
我们试图通过提问来找到从整数集{1,2...n}中选择的隐藏数字。我们问的每个数字问题我们得到三个可能的答案之一“你的猜测低于隐藏的数字”并且你需要花费一个成本或者“你的猜测高于隐藏的数字”和你承担b的费用或“是的就是这样游戏结束。给定na和b的值最优策略最小化最坏情况下的总成本。
We are trying to find a hidden number selected from the set of integers {1, 2, ..., n} by asking questions.
例如如果n = 5a = 2b = 3那么我们可以先问“2”作为我们的第一个问题。
Each number (question) we ask, we get one of three possible answers: "Your guess is lower than the hidden number" (and you incur a cost of a), or
如果我们被告知2高于隐藏号码b = 3的成本那么我们确定“1”是隐藏号码总成本为3。如果我们被告知2低于隐藏号码a = 2的成本那么我们的下一个问题将是“4”。如果我们被告知4高于隐藏号码b = 3的成本那么我们确定“3”是隐藏号码总成本为2 + 3 = 5。如果我们被告知4低于隐藏号码a = 2的成本那么我们确定“5”是隐藏号码总成本为2 + 2 = 4。因此该策略实现的最坏情况成本为5.还可以证明这是可以实现的最低的最坏情况成本。所以事实上我们刚刚描述了给定na和b值的最优策略。
"Your guess is higher than the hidden number" (and you incur a cost of b), or
设Cnab是针对给定na和b值的最优策略实现的最坏情况成本。
"Yes, that's it!" (and the game ends).
以下是几个例子C5,2,3= 5 C500√2√3= 13.22073197 ... C20000,5,7= 82 C2000000√5√7 = 49.63755955 ......
Given the value of n, a, and b, an optimal strategy minimizes the total cost for the worst possible case.
设Fk为斐波纳契数Fk = Fk-1 + Fk-2基本情况F1 = F2 =1.FindΣ1≤k≤30C1012√k√Fk并将答案四舍五入为8小数点后面的小数位数。
For example, if n = 5, a = 2, and b = 3, then we may begin by asking "2" as our first question.
If we are told that 2 is higher than the hidden number (for a cost of b=3), then we are sure that "1" is the hidden number (for a total cost of 3). If we are told that 2 is lower than the hidden number (for a cost of a=2), then our next question will be "4". If we are told that 4 is higher than the hidden number (for a cost of b=3), then we are sure that "3" is the hidden number (for a total cost of 2+3=5). If we are told that 4 is lower than the hidden number (for a cost of a=2), then we are sure that "5" is the hidden number (for a total cost of 2+2=4). Thus, the worst-case cost achieved by this strategy is 5. It can also be shown that this is the lowest worst-case cost that can be achieved. So, in fact, we have just described an optimal strategy for the given values of n, a, and b.
Let C(n, a, b) be the worst-case cost achieved by an optimal strategy for the given values of n, a, and b.
Here are a few examples: C(5, 2, 3) = 5 C(500, √2, √3) = 13.22073197... C(20000, 5, 7) = 82 C(2000000, √5, √7) = 49.63755955...
Let Fk be the Fibonacci numbers: Fk = Fk-1 + Fk-2 with base cases F1 = F2 = 1.Find ∑1≤k≤30 C(1012, √k, √Fk), and give your answer rounded to 8 decimal places behind the decimal point.
# --hints--
`euler406()`应返回36813.12757207
`euler406()` should return 36813.12757207.
```js
assert.strictEqual(euler406(), 36813.12757207);