AtCoder Beginner Contest 184
D
increment of coins
AtCoder
⌀ 1276
原题
← CE →
翻译中…

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:

翻译中…

A B C

翻译中…

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}$.

翻译中…

样例

Input #1
99 99 99
Output #1
1.000000000
No matter what coin we take out in the first operation, the bag will contain $100$ coins of that kind.
Input #2
98 99 99
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$
Input #3
0 0 1
Output #3
99.000000000
Each operation adds a bronze coin.
Input #4
31 41 59
Output #4
91.835008202
题目信息
题号
abc184_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。