Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.28 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define NL '\n'
  5. #define xx first
  6. #define yy second
  7. #define eps 1e-9
  8. #define ins insert
  9. #define pb push_back
  10. #define mp make_pair
  11. #define ll long long
  12. #define sz(x) x.size()
  13. #define pi 2.0*acos(0.0)
  14. #define sqr(x) ((x) * 1ll * (x))
  15. #define all(x) (x).begin(),(x).end()
  16. #define FIN freopen("input.txt", "r", stdin);
  17. #define FOUT freopen("output.txt", "w", stdout);
  18. #define rep(ii,aa,bb) for(int (ii)=int(aa);(ii)<(int)(bb);++(ii))
  19. #define per(ii,aa,bb) for(int (ii)=int(aa)-1;(ii)>=(int)(bb);--(ii))
  20. #define _fastIO() ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0)
  21.  
  22. ll bigMod(ll N,ll P,ll M){
  23.     //used for calculating: N^P % M
  24.     if(P==0) return 1;
  25.     if(P%2==0){
  26.         ll ret=bigMod(N,P/2,M);
  27.         return ((ret%M)*(ret%M))%M;
  28.     }
  29.     else return ((N%M)*(bigMod(N,P-1,M)%M))%M;
  30. }
  31.  
  32. bool status[10000001];
  33. void sieve(void){
  34.   int n = sqrt(1000001);
  35.   for(int i=3; i<=n; i+=2){
  36.     if(status[i]==0){
  37.       for(int j=i*i; j<1000001; j += i+i){
  38.         status[j] = 1;
  39.       }
  40.     }
  41.   }
  42. }
  43.  
  44. int main(){
  45.     _fastIO();
  46.     double a , b;
  47.     cin >> a >> b;
  48.     double area1 = pi * a * a;
  49.     double area2 = pi * (b-a) * (b-a);
  50.     double toto = area1 - area2;
  51.     cout<< fixed << setprecision(6) << (100 - toto*100/area1);
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement