View Code of Problem 3803

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;

#define MAX(a,b) (a)>(b)?(a):(b);
#define MAXN 10010
typedef long long ll;



int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        for(int i=0;i<n;i++)
        {
            int a,b;
            scanf("%d%d",&a,&b);
            printf("%.5lf\n",a/(1.0*(a+b)));
        }
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3803