#include <bits/stdc++.h>
using namespace std;
#define MAX 1000003
#define tiny 0.000000001
#define pi acos(-1)
int N,F;
int r[MAX];
bool check(double x){
double np=0;//number of person
for(int i=1;i<=N;i++){
np+= double (r[i]*r[i]/x);
}
if(np >= (F+1)) return true;
else return false;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin>>n;
double upper=MAX*10,lower=tiny;
double x;
while(n--){
cin>>N>>F;
for(int i=1;i<=N;i++) cin>>r[i];
//mergeSort(r,1,N);
while(upper - lower > tiny){
x=double((upper+lower)/2);
if(check(x)) lower=x;
else upper=x;
}
cout<<fixed<<setprecision(6)<<pi*upper<<endl;
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}