我太难了,先放在这里,等我离散数学学了,在更
链接:登录—专业IT笔试面试备考平台_牛客网
来源:牛客网
题目描述
Thousand wants to drink a cup of tea.
The volume of his teacup is 1 unit and it is empty initially. Thousand will not drink the tea unless the teacup is full.
Thousand places the teacup on his table, and waits for his assistant BSP to fill the teacup.
Every time BSP visits Thousand's office, BSP will bring a pot with u∈[0,x]u \in [0,x]u∈[0,x] units of tea randomly, and fill them all into Thousand's teacup.
Thousand wants to know the expected number of visits his assistant has to make so that he can drink the tea.
Note that xxx and uuu are real numbers.
输入描述:
The input consists of:
One line containing a real number xxx (1≤x≤1018)(1 \leq x \leq 10^{18})(1≤x≤1018).
输出描述:
Please output one real number rounded to 9 digits decimal, representing the expected times.
示例1
输入
复制2.5
2.5
输出
复制1.491824698
1.491824698
询问期望随机选择几次 [0,x][0,x][0,x] 中的实数进行累加后,结果不小于1。
答案
e1xe^{\frac{1}{x}}ex1
解答
期望为
∑i=1∞ i∗((x1)i∗(1−i1)∗((i−1)!1)+(x1)i−1∗(1−x1)∗(i−1)!1)
吐槽
这题最大的 Hint 是他被放在了E题。
这题也有若干种通过方法,鼓掌。然而内榜有好几个人被这题卡到自闭,我可怜的队友被这题卡了三个小时。
时隔半年,即使黄老师已经快要入土了,他还是想喝茶。