测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A9009. Archer

编程题 普及/提高-

题目描述

SmallR is an archer. SmallR is taking a match of archer with Zanoes. They try to shoot in the target in turns, and SmallR shoots first. The probability of shooting the target each time is ![](/uploads/luogu/CF312B/eecd60ed91fbeebe74e2406ea1a11d26df905945_2b47b5fc54df.png) for SmallR while ![](/uploads/acgo/image/aae16a28c091c8b7_551ca7ea68be.jpeg) for Zanoes. The one who shoots in the target first should be the winner.

Output the probability that SmallR will win the match.

输入格式

A single line contains four integers ![](/uploads/acgo/image/c8fe729a108c8ad5_2dd766270393.jpeg).

输出格式

Print a single real number, the probability that SmallR will win the match.

The answer will be considered correct if the absolute or relative error doesn't exceed $10^{-6}$ .

输入输出样例

输入 #1
1 2 1 2
输出 #1
0.666666666667
上一题 去做题 下一题