No.1688 Veterinarian
Problem Statement
A bag contains $A$ white chips, $B$ black chips, and $C$ brown chips.
You repeat the following operation $N$ times.
What is the expected number of chips of each color that you finally obtain?
Input
$A$ $B$ $C$ $N$
Output
Print the expected number of chips of each color that you finally obtain, separated by spaces, in the order white, black, brown. Your answer is considered correct if the absolute or relative error from the correct value is at most $10^{-6}$.
Sample
Sample 1
Input
3 2 1 1
Output
0.2 0.06666666666666667 0.0
In $1$ operation, the probability of obtaining a white chip is ${}_3\mathrm{C}_2/{}_6\mathrm{C}_2=1/5$.
The probability of obtaining a black chip is ${}_2\mathrm{C}_2/{}_6\mathrm{C}_2=1/15$.
There is no possibility of obtaining a brown chip.
Sample 2
Input
1 1 1 50
Output
0.0 0.0 0.0
No matter how many operations you perform, you never obtain a chip.
Sample 3
Input
4 3 2 13
Output
1.7966653641138075 1.0669842436070012 0.4428093340194705
The expected values are, respectively,
$3452192328044966520392806880021097467/1921444247213913479420805120000000000$
$1171514706712320746421671594290613233/1097968141265093416811888640000000000$
$5105000684786014790930854501796258921/11528665483283480876524830720000000000$
.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
ansain
LayCurse