B will use a cone with a surface area of S to pack the Baishan cloud. B wants to maximize the size of the Baishan cloud. B wants to know the maximum size. Note that the surface area of the cone includes the bottom and side. Input
An integer in a row, indicating the surface area S. (1 <= S <= 10 ^ 9)
Output
A row has a real number, indicating the volume.
Input example
8
Output example
1.504506
Code:
1 #include <cstdio> 2 #include <cmath> 3 #include <cstring> 4 #include <string> 5 #include <algorithm> 6 #include <queue> 7 #include <stack> 8 #include <map> 9 #include <set>10 #include <vector>11 #include <iostream>12 using namespace std;13 #define for0(i, n) for(int i=0; i<(n); ++i)14 #define for1(i,a,n) for(int i=(a);i<=(n);++i)15 #define for2(i,a,n) for(int i=(a);i<(n);++i)16 #define for3(i,a,n) for(int i=(a);i>=(n);--i)17 #define for4(i,a,n) for(int i=(a);i>(n);--i)18 #define CC(i,a) memset(i,a,sizeof(i))19 #define LL long long20 #define MOD 100000000721 #define INF 0x3f3f3f3f22 #define MAX 5010023 #define PI 3.141592624 25 int main()26 {27 double s;28 scanf("%lf",&s);29 printf("%lf\n",s*sqrt(s *PI *2)/(PI*12));30 return 0;31 }
1629 B's cone