#E. D - increment of coins

    传统题 1000ms 256MiB

D - increment of coins

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

D - increment of coins

Score : $400$ points

Problem Statement

We have a bag containing $A$ gold coins, $B$ silver coins, and $C$ bronze coins.

Until the bag contains $100$ 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

  • $0 \leq A,B,C \leq 99$
  • $A+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 $10^{-6}$.


99 99 99
1.000000000

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


98 99 99
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$


0 0 1
99.000000000

Each operation adds a bronze coin.


31 41 59
91.835008202

2024寒假入门组刷题营(十)

未参加
状态
已结束
规则
ACM/ICPC
题目
8
开始于
2024-2-7 13:30
结束于
2024-2-7 15:30
持续时间
2 小时
主持人
参赛人数
10