Problem | Verdict | Lang | Time | Best | Rank | Submit Time |
---|---|---|---|---|---|---|
| discuss10678 - | Accepted | C++11 | 0.000 | 0.000 | 1136 | 19 secs ago |
#include <bits/stdc++.h>
using namespace std;
double t, x, y, z, s;
double pi = 2*acos(0);
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> t;
while(t--){
cin >> y >> z;
y /= 2;
z /= 2;
x = sqrt(z*z - y*y); //pitago
s = pi * x * z;
cout<<fixed<<setprecision(3)<<s<<"\n";
}
}
No comments:
Post a Comment