赌徒输光问题
链接:https://blog.youkuaiyun.com/xiazeyu513/article/details/78151388
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
while(2==scanf("%d%d",&n,&m)){
printf("%.5lf\n",1.0*n/(n+m));
}
return 0;
}
赌徒输光问题
链接:https://blog.youkuaiyun.com/xiazeyu513/article/details/78151388
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
while(2==scanf("%d%d",&n,&m)){
printf("%.5lf\n",1.0*n/(n+m));
}
return 0;
}