-->
当前位置:首页 > 题库

PROGRAMMING:Card drawing game

Luz5年前 (2021-05-10)题库452
The inspiration of this problem comes from a classical probability model.
There are $$x $$s $$cards and $$y $$a $$cards in a card pool.
$$Alice $$randomly draws a card from the card pool without putting it back each time.
$$Bob $$watched $$Alice $$draw cards and predicted the results each time:
If there are more $$s $$cards than $$a $$cards in the card pool, $$Bob $$will guess that $$Alice $$pulls out the $$s $$cards.
On the contrary, it will guess that $$Alice $$pulls out the $$a $$card.
But if the number of the two cards in the card pool is equal, $$Bob $$will not make any guess about the result of the card extraction.
$$Alice $$will draw the card until the card pool is empty.
Now let me tell you the number of $$s $$cards and $$a $$cards in the card pool at the beginning. How many times can you guess correctly in the expectation of $$Bob $$?
###Input format:
Give two integers in one line $$a, B (1 / Leq a, B / Leq 10 ^ 5)$$
###Output format:
A real number is expected, rounded to two decimal places.
###Input example:
```in
1 1
```
###Output example:
```out
one
```
###Example explanation:
In the initial situation, $$Bob $$doesn't make any guess. After the first draw, no matter what kind of card is left, $$Bob $$can guess correctly in the second draw, so the expectation is $$1.00$$







answer:If there is no answer, please comment