#include <stdio.h>#include <iostream>usingnamespacestd;
int main(){
double r;
while (cin>>r){
double ans=4.0/3*r*r*r*3.14;
printf("%.2f",ans);
}
return0;
}
e 大象喝水
#include <stdio.h>#include <iostream>usingnamespacestd;
#define Pi 3.14159int main(){
double h,r;
while (cin>>h>>r){
double ans=Pi * r * r * h;
int k = 20*1000/ans;
if (20*1000-ans*k>1e-6) k++;
cout<<k<<endl;
}
return0;
}