来自"NOCOW"
#include <iostream>
using namespace std;
int n,m,k;
double ans;
int main()
{
cin >> n;
while (n--)
{
cin >> k >> m;
ans=1.0-(double)m/(double)(k+1);
if (ans < 0) ans=0;
cout.precision(6);
cout.setf(ios::fixed);
cout << ans << endl;
}
return 0;
}
//by zzy