1.2 KiB
1.2 KiB
id, title, challengeType, forumTopicId, dashedName
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
5900f4fa1000cf542c51000d | 問題 398: ロープの切断 | 5 | 302063 | problem-398-cutting-rope |
--description--
長さ n
のロープの内側にn - 1
個の点が付けられています。点の間隔、および点からロープの端までの長さはそれぞれ 1 です。 これら点のうち、m - 1
個の点を無作為に選択し、それらの点でロープを切断して m
本のロープ片を作成します。
2 番目に短いロープ片の長さの期待値を E(n, m)
とします。 例えば、E(3, 2) = 2
, E(8, 3) = \frac{16}{7}
です。 なお、最短の長さのロープ片が複数ある場合、2 番目に短いロープ片の長さは最短の長さと同一であると定義します。
E({10}^7, 100)
を求めなさい。 回答は、四捨五入して小数第 5 位まで示すこと。
--hints--
cuttingRope()
は 2010.59096
を返す必要があります。
assert.strictEqual(cuttingRope(), 2010.59096);
--seed--
--seed-contents--
function cuttingRope() {
return true;
}
cuttingRope();
--solutions--
// solution required