QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#2655. 老鼠

Statistics

为了庆祝鼠年,Douglas 决定统计他所在区域内老鼠的数量。由于老鼠非常善于隐藏,他无法找到所有的老鼠。然而,在新年第一天,Douglas 成功捕获了 $n_1$ 只老鼠,并在释放它们之前给每只老鼠都贴上了耳标。在新年第二天,Douglas 又捕获了 $n_2$ 只老鼠,并观察到其中有 $n_12$ 只在第一天被标记过。

Douglas 请求你帮助他估计该区域内老鼠的总数。查阅统计学教材后,你建议使用 Chapman 估计量 $\hat{N}$,其公式如下:

$$\hat{N} := \left\lfloor \frac{(n_1 + 1)(n_2 + 1)}{n_{12} + 1} - 1 \right\rfloor$$

其中 $\lfloor x \rfloor$ 表示实数 $x$ 的向下取整,即小于或等于 $x$ 的最大整数。

输入格式

输入包含一行,由三个空格分隔的整数组成:$n_1, n_2, n_{12}$,顺序如上。

输出格式

输出包含一行,即计算出的整数 $\hat{N}$。

数据范围

  • $0 \leqslant n_1, n_2 \leqslant 10\,000$;
  • $0 \leqslant n_{12} \leqslant \min(n_1, n_2)$。

样例

样例输入 1

15 18 11

样例输出 1

24

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.