program hungry;
uses math;
const
filename='hungry';
var
n,l,d,s:longint;
procedure solve;
var
i:longint;
k,a,ans:double;
begin
readln(n);
for i:=1 to n do
begin
readln(l,d,s);
if s<=d then
begin
writeln(sqr(s)*pi:0:2);
continue;
end else
begin
k:=l/2/d;
if k=1 then
begin
ans:=(0.75*(2*pi))*s;
end else
begin
a:=arctan(2*k/(1-k*k));
ans:=(2*pi-a)*s;
end;
k:=d/l/2;
if k=1 then
begin
ans:=ans+(pi/2)*(s-sqrt(d*d+sqr(l/2)))*2;
end else
begin
a:=arctan(2*k/(1-k*k));
ans:=ans+(pi-a)*(s-sqrt(d*d+sqr(l/2)))*2;
end;
writeln(ans:0:2);
end;
end;
end;
begin
assign(input,filename+'.in'); reset(input);
assign(output,filename+'.out'); rewrite(output);
solve;
close(input); close(output);
end.