fork download
  1.  
  2. #include <iostream>
  3. #include <iomanip>
  4. #include<cmath>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.  
  10.  
  11.  
  12.  
  13. /* double r;
  14.   double pi = 3.141592653;
  15.  
  16.   cin >> r;
  17.   cout << fixed << setprecision(9) << (pi * r * r);
  18.   */
  19.  
  20.  
  21.  
  22. // long long x;
  23. // long long y;
  24. // int a , b;
  25. // cin >> x >> y;
  26. // a = x % 10;
  27. // b = y % 10;
  28. // cout << a + b;
  29.  
  30.  
  31.  
  32. /* long long x, y, n;
  33.   cin >> n >> x >> y;
  34.   cout << n * (y - x) << endl;
  35.   */
  36.  
  37. /*long long x, y;
  38.   cin >> x >> y;
  39.   cout << x / y;
  40.   */
  41.  
  42. /* cout << fixed << setprecision(6);
  43.   double n, r;
  44.   double pi = 3.141592;
  45.  
  46.   cin >> n >> r;
  47.   cout << fixed << setprecision(6) << (pi * r * r) - (n * n);
  48.   */
  49.  
  50. /*double x, y;
  51.   cin >> x >> y;
  52.   long long ans = ceil(x / y);
  53.   cout << ans;
  54.   */
  55. /*long long n;
  56.   cin >> n;
  57.   cout << 0 << " " << 0;
  58.   */
  59.  
  60. /*double a, b;
  61.   cin >> a >> b;
  62.   cout << "floor " << a << " / " << b << " = " << floor(a / b) << endl;
  63.   cout << "ceil " << a << " / " << b << " = " << ceil(a / b) << endl;
  64.   cout << "round " << a << " / " << b << " = " << round(a / b) << endl;
  65.   */
  66.  
  67. /* long long n, sum;
  68.   cin >> n;
  69.   sum = (n * (n + 1)) / 2;
  70.   cout << sum; */
  71.  
  72. /* double a, b, c, x;
  73.   cin >> a >> b >> c;
  74.   x = ((2 * a) + (3 * b)) * (5 * c);
  75.   cout << fixed << setprecision(6) << x;
  76.   */
  77.  
  78.  
  79. /* long long n;
  80.   cin >> n;
  81.   cout << n;
  82.   */
  83.  
  84.  
  85. double r;
  86. double pi = 3.141592;
  87.  
  88. cin >> r;
  89.  
  90. cout << fixed << setprecision(4) << (pi * r * r) + (0.5 * 2 * r * 1.732050 * r) - (0.5 * r * (3.141592 / 3));
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. return 0;
  101. }
  102.  
  103.  
Success #stdin #stdout 0.01s 5292KB
stdin
3

stdout
42.2920