SHARE
TWEET

lightoj - 1022 - Circle in Square

jakaria_hossain Jul 31st, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. double pi= 2* acos(0.0);
  5. int main()
  6. {
  7.    int t,c;
  8.    cin>>t;
  9.    for(c=1;c<=t;c++)
  10.    {
  11.        double r,l;
  12.        cin>>r;
  13.        l=r*2;
  14.        double x=l*l-pi*r*r;
  15.        cout<< "Case "<<c<<setprecision(2)<<fixed<< ": "<<x<<endl;
  16.    }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top