Friday, 23 October 2015

Codeforces Gym 100796F - Unusual Sum Problem_Solution

/*
Tanzila Islam
Southeast University
mail : tanzilamohita@gmail.com
Problem Link : http://codeforces.com/gym/100796/problem/F
*/
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int t;
double l, r;
scanf("%d", &t);
while(t--){
scanf("%lf%lf", &l, &r);
printf("%.12lf\n", (1/l)-(1/(r+1)));
}
return 0;
}

No comments:

Post a Comment