/*
* hdu1969.c
*
* Created on: 2011-10-9
* Author: bjfuwangzhu
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define nmax 10010
#define pi acos(-1.0)
#define eps 1.0e-5
double volume[nmax];
int cmp(int n, double aver) {
int i, temp;
for (i = 0, temp = 0; i < n; i++) {
temp += (int) (volume[i] / aver);
}
return temp;
}
void solve(int n, int f, double sum) {
double left, right, mid;
left = 0.0, right = sum / f;
while (fabs(left - right) > eps) {
mid = (left + right) / 2;
if (cmp(n, mid) >= f) {
left = mid;
} else {
right = mid;
}
}
printf("%.4lf\n", mid);
}
int main() {
#ifndef ONLINE_JUDGE
freopen("data.in", "r", stdin);
#endif
int t, n, f, i, r;
double sum;
scanf("%d", &t);
while (t--) {
scanf("%d %d", &n, &f);
for (i = 0, sum = 0.0; i < n; i++) {
scanf("%d", &r);
volume[i] = pi * r * r;
sum += volume[i];
}
solve(n, f + 1, sum);
}
return 0;
}