#P15192. [SWERC 2019] Rats
[SWERC 2019] Rats
题目描述
To celebrate the Lunar New Year of the Rat, Douglas decides to count the number of rats living in his area. It is impossible for him to find all rats, as they tend to be well hidden. However, on the first day of the new year, Douglas manages to capture rats, and marks each of them with an ear tag before releasing them. On the second day of the new year, Douglas captures rats, and observes that of them had been marked during the first day.
Douglas is asking for your help to estimate the total number of rats in his area. Looking up in your statistics textbook, you propose using the Chapman estimator , given by:
$$\hat{N} := \left\lfloor \frac{(n_1 + 1)(n_2 + 1)}{n_{12} + 1} - 1 \right\rfloor$$where is the floor of a real number , i.e., the closest integer less than or equal to .
输入格式
The input consists of a single line, with three space-separated integers: , , , in that order.
输出格式
The output should contain a single line with the single integer .
15 18 11
24
提示
Limits
- ;
- .