32 lines
403 B
C++
32 lines
403 B
C++
|
#include <iostream>
|
||
|
#include<cstdio>
|
||
|
#include<algorithm>
|
||
|
#include <cmath>
|
||
|
using namespace std;
|
||
|
//const int N=1e8+5;
|
||
|
//void initialise(int n)
|
||
|
//{
|
||
|
//
|
||
|
//}
|
||
|
int main()
|
||
|
{
|
||
|
int t;
|
||
|
double H,h,D;
|
||
|
scanf("%d",&t);
|
||
|
while(t--)
|
||
|
{
|
||
|
scanf("%lf%lf%lf",&H,&h,&D);
|
||
|
// initialise(n);
|
||
|
double add=D/2-(H-h);
|
||
|
if(add>0)
|
||
|
{
|
||
|
printf("%.3lf\n",h+add);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("%.3lf\n",h);
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|