///@link http://acm.hdu.edu.cn/showproblem.php?pid=1969
///@author Sycamore
///@date Aug 16
#include<bits/stdc++.h>
using namespace std;
const double eps=1e-5,PI=acos(-1);
#define endl '\n'
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin>>T;
while(T--)
{
int n,f;
cin>>n>>f;
f++;
double total=0;
vector<double>volume(n);
for(auto &e:volume)
{
cin>>e;
e*=e*PI;
total+=e;
}
double low=0,high=total/f,mid;
while(low+eps<=high)
{
long long cnt=0;
mid=(low+high)/2;
for(auto &e:volume)
cnt+=int(e/mid);//notice here! 9 WAs in 17 min!
//int can be floor
//consider the expression cnt+=e/mid
//several events happen as follows
//1)double tmp==(double)cnt+e/mid;
//2)cnt=(int)tmp;
//the extra errors yield when cnt is cast to double type
//and then added by the value of e/mid
if(cnt>=f)low=mid;
else high=mid;
}
cout<<fixed<<setprecision(4)<<mid<<endl;
}
return 0;
}