#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
const double PI = 2 * acos(0);
int main()
{
double d, l;
int t;
double a, b;
#ifndef ONLINE_JUDGE
ifstream cin("uva_in.txt");
#endif
cin >> t;
cout.precision(3);
while (t--) {
cin >> d >> l;
a = l / 2.0;
b = sqrt( a * a - d * d / 4);
cout << fixed << PI * a * b << endl;
}
return 0;
}
UVa10678 - The Grazing Cow
最新推荐文章于 2024-01-20 15:11:30 发布