#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main() {
	// your code goes here
	int n, x, y, z, r, a, b, c, d;
	cin>>n;
	for(int i=0; i<n; i++){
			cin>>x>>y>>z>>r>>a>>b>>c>>d;
			cout<<setprecision(12)<<M_PI*r*r<<endl;
	}
	return 0;
}