312B.md (1042B)
1 Source: https://codeforces.com/problemset/problem/312/B 2 3 B. Archer 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 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  for SmallR while  for Zanoes. The one who shoots in the target first should be the winner. 22 23 Output the probability that SmallR will win the match. 24 25 Input 26 27 A single line contains four integers . 28 29 Output 30 31 Print a single real number, the probability that SmallR will win the match. 32 33 The answer will be considered correct if the absolute or relative error doesn't exceed 10- 6. 34 35 Examples 36 37 Input 38 39 ``` 40 1 2 1 2 41 ``` 42 43 Output 44 45 ``` 46 0.666666666667 47 ```