Type: RemoteJudge 1000ms 162MiB

收集邮票

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

nn 种不同的邮票,皮皮想收集所有种类的邮票。唯一的收集方法是到同学凡凡那里购买,每次只能买一张,并且买到的邮票究竟是 nn 种邮票中的哪一种是等概率的,概率均为 1/n1/n。但是由于凡凡也很喜欢邮票,所以皮皮购买第 kk 次邮票需要支付 kk 元钱。

现在皮皮手中没有邮票,皮皮想知道自己得到所有种类的邮票需要花费的钱数目的期望。

输入格式

一行,一个数字 NNN10000N \le 10000)。

输出格式

输出要付出多少钱,保留二位小数。

3
21.25

ch20 - 数学期望

Not Claimed
Status
Done
Problem
8
Open Since
2024-1-29 12:00
Deadline
2024-3-3 23:59
Extension
2400 hour(s)