#abc184d. D - increment of coins

D - increment of coins

Score : 400400 points

问题陈述

我们有一个袋子,里面装有 AA 个金币,BB 个银币,和 CC 个铜币。

在袋子里装有 100100 个同色硬币之前,我们将重复以下操作:

操作:从袋子里随机取出一个硬币。(每个硬币被选中的概率相等。)然后,将两个与取出的硬币相同种类的硬币放回袋子里。

找出操作执行次数的期望值。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

We have a bag containing AA gold coins, BB silver coins, and CC bronze coins.

Until the bag contains 100100 coins of the same color, we will repeat the following operation:

Operation: Randomly take out one coin from the bag. (Every coin has an equal probability of being chosen.) Then, put back into the bag two coins of the same kind as the removed coin.

Find the expected value of the number of times the operation is done.

Constraints

  • 0A,B,C990 \leq A,B,C \leq 99
  • A+B+C1A+B+C \geq 1

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Print the expected value of the number of times the operation is done. Your output will be accepted if its absolute or relative error from the correct value is at most 10610^{-6}.

Sample Input 1

99 99 99

Sample Output 1

1.000000000

No matter what coin we take out in the first operation, the bag will contain 100100 coins of that kind.

Sample Input 2

98 99 99

Sample Output 2

1.331081081

We will do the second operation only if we take out a gold coin in the first operation. Thus, the expected number of operations is $2\times \frac{98}{98+99+99}+1\times \frac{99}{98+99+99}+1\times \frac{99}{98+99+99}=1.331081081\ldots$

Sample Input 3

0 0 1

Sample Output 3

99.000000000

Each operation adds a bronze coin.

Sample Input 4

31 41 59

Sample Output 4

91.835008202