|
|
back to boardWhy wa?i can't understand it.. #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { long double x,y; cout <<setprecision(3)<<fixed<<showpoint; const long double pi=3.1416; cin >>x>>y; if(x/2<y) { if(sqrt(2.0)*x<=y) cout <<x*x<<endl; else { cout <<y*y*pi-(y*y*acosl(x/2/y)-sqrtl(y*y-x*x/4)*x/2)*4 <<endl; } } else cout <<y*y*pi<<endl; //system("pause"); return 0; } |
|
|