2274: Election
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:12
解决:7
题目描述
There is a election between 2 persons. The election has p+q rounds. In each round, either person A or person B gets one vote. The probility that A gets a vote is equal to the probility that B gets a vote . Finally, person A gets p votes and person B gets q votes(p > q). Can you figure out the probability that in any round person A gets more votes than person B.
输入
Multiple cases. Every case takes a line with the positive integers p and q(p > q, p and q are 32-bit-signed integers).
输出
One case a line.Print the probability, with exactly 6 digits after the decimal point.
样例输入 复制
2 1
样例输出 复制
0.333333