标签:
Output the probability that SmallR will win the match.
A single line contains four integers .
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 2 1 2
0.666666666667
1 #include <bits/stdc++.h> 2 using namespace std; 3 int a,b,c,d; 4 int main(){ 5 while(~scanf("%d%d%d%d",&a,&b,&c,&d)) 6 printf("%.8f\n",(double)a*d/(a*d+b*c-c*a)); 7 return 0; 8 }
标签:
原文地址:http://www.cnblogs.com/crackpotisback/p/4659402.html