Advertisement
jakaria_hossain

lightoj - 1022 - Circle in Square

Jul 31st, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement