#2975. Election

    ID: 2975 传统题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>洛谷组合数学概率DP杨辉三角卡特兰数

Election

Election

题目描述

       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