Anik_Akash

1072 - Calm Down

Nov 6th, 2020
982
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //thanks God For Every Thing!
  2. //contest link:
  3. //#include<bits/stdc++.h>
  4. #include <iostream>
  5. #include <fstream>
  6. #include <string>
  7. #include <algorithm>
  8. #include <cmath>
  9. #include <cstdio>
  10. #define pi           (acos(-1.0)) //3.1415926535897932384626
  11. #define flush        cin.ignore(numeric_limits<streamsize>::max(),'\n');
  12. #define fasterio     ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  13. #define NL           printf("\n")
  14. #define fin          freopen("int.txt","r",stdin);
  15. #define fout         freopen("out.txt","w",stdout);
  16.  
  17. using namespace std;
  18. typedef long long int ll;
  19. typedef double dl;
  20. typedef unsigned long long ul;
  21.  
  22. // ---------------------- slove---------------------------//
  23. int find(int n);
  24. int main()
  25. {
  26.   //fin
  27.   //fout
  28.   int t;
  29.   scanf("%d",&t);
  30.   for(int i=1; i<=t; i++)
  31.   {
  32.     dl R, big_area=0,sm_area=0,  ans=0;
  33.     int r;
  34.     scanf("%lf %d",&R,&r);
  35.  
  36.     big_area = (4*1.0)*pi*(R*R);
  37.     sm_area = big_area/r;
  38.     ans = sqrt(sm_area/4*pi);
  39.  
  40.     printf("Case %d: %.10lf\n",i, ans);
  41.   }
  42.     return 0;
  43. }
  44. //author anikaksh;
RAW Paste Data