#include<bits/stdc++.h>
#define PI acos(-1)
#define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define mem(a,b) memset(a,b,sizeof(a))
#define MX 100005
#define MXX 2000005
//#define s second
//#define f first
#define mod 1000000007
#define inf 1e9
#define eps 1e-15
//int ex[]={1,-1,0,0};
//int wye[]={0,0,1,-1};
using namespace std;
int t;
double l,n,c,an,b,a,tmp,s;
int main()
{
fast();
scanf("%d",&t);
for(int i=1;i<=t;i++){
scanf("%lf%lf%lf",&l,&n,&c);
s=(1+(n*c))*l;
double hi=1e9,lo=0.0,mid;
for(int j=1;j<=100;j++){
mid=(lo+hi)/2.0;
b=((l/2)*(l/2))+(mid*mid);
a=l*l;
tmp=(acos((b+b-a)/(b+b))*sqrt(b));
if(s>tmp) hi=mid;
else lo=mid;
}
tmp=((l/2)*(l/2))+(mid*mid);
tmp=(sqrt(tmp)-mid);
printf("Case %d:%.15lf\n",i,tmp);
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBQSSBhY29zKC0xKQojZGVmaW5lIGZhc3QoKSBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApO2Npbi50aWUoMCk7Y291dC50aWUoMCk7CiNkZWZpbmUgbGwgbG9uZyBsb25nIGludAojZGVmaW5lIG1lbShhLGIpIG1lbXNldChhLGIsc2l6ZW9mKGEpKQojZGVmaW5lIE1YIDEwMDAwNQojZGVmaW5lIE1YWCAyMDAwMDA1Ci8vI2RlZmluZSAgcyBzZWNvbmQKLy8jZGVmaW5lIGYgZmlyc3QKI2RlZmluZSBtb2QgMTAwMDAwMDAwNwojZGVmaW5lIGluZiAxZTkKI2RlZmluZSBlcHMgMWUtMTUKLy9pbnQgZXhbXT17MSwtMSwwLDB9OwovL2ludCB3eWVbXT17MCwwLDEsLTF9Owp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgdDsKIGRvdWJsZSBsLG4sYyxhbixiLGEsdG1wLHM7C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