program hungry;
uses math;
const
pi=3.14159265357;
var
i,k:longint;
t:longint;
l,s,d,j:real;
area:real;
tan,du:real;
begin
assign(input,'hungry.in');
reset(input);
assign(output,'hungry.out');
rewrite(output);
readln(t);
for k:=1 to t do
begin
readln(l,d,s);
j:=sqrt(d*d+l*l/4);
if s<=d then
begin
area:=pi*s*s;
end
else
if s>=j then
begin
tan:=(l/2)/d;
du:=arctan(tan);
area:=pi*s*s*((pi-du)/pi);
du:=pi/2-du;
du:=pi-du;
area:=area+pi*sqr(s-j)*(du/pi);
area:=area+l*d/2;
end
else
begin
j:=sqrt(s*s-d*d);
tan:=j/d;
du:=arctan(tan);
area:=pi*s*s*((pi-du)/pi);
area:=area+j*d;
end;
writeln(area:0:2);
end;
close(input);
close(output);
end.