1332 - Zoo

Time Limit : 1 Second

Memory Limit : 128 MB

Submission: 23

Solved: 15

Description
There are two famous Zoo(Ningbo-Zoo and Wuhan-Zoo) in the Country.When new animals come.They will be sent to Ningbo-Zoo in a probability of A( 0<=A<=1 ) and sent to Wuhan-Zoo in the a probability of 1-A .Unfortunately we don't know what A equals to . What we only know is that the K of the first N animals were sent to the Ningbo-Zoo.
Please find the expectation of the number of the next N animals that will be sent to the Ningbo-Zoo.
Input
Input have multiple test cases and terminates with EOF.
Each case has a line containing two integers N(0<N<=100000), K(0<=K<=N).
Output
For each case output one number indicating the expectation in one line rounded to the thousands.
sample input
10 5
100 0
sample output
5.000
0.980

HINT
Animails  are sent to each Zoo independently.
hint
source
Haimiao Ding
© 2015 HUST ACMICPC TEAM. All Right Reserved.