program WEIGHING;
var a,b,c,d,e,f,g,i,j:integer;
var x:real;
input:text;
begin
     assign(input, 'transport.in');
     reset(input);
     readln(input, a);
     for i:= 1 to a do
     begin
     readln(input, b,c,d);
     for j:=1 to b do
     begin
     read(input,e,f);
     g:=g+f;
     end;
     x:=(d/c*60)+g;
     writeln(x:0:2);
     x:=0;
     g:=0;
     end;
     close(input);
end.