题解 | #牛牛的水杯#
牛牛的水杯
http://www.nowcoder.com/practice/c196c47c23394bf3bdd4f82a838df6bf
#include<stdio.h>
#include<math.h>
int main(){
float a,b;
float s;
float n;
int m;
scanf("%f %f",&a,&b);
s=3.14*a*b*b;
n=10000/s;
m=round(n+0.5); //math.h自带的取整函数
printf("%d",m);
return 0;
}
#include<math.h>
int main(){
float a,b;
float s;
float n;
int m;
scanf("%f %f",&a,&b);
s=3.14*a*b*b;
n=10000/s;
m=round(n+0.5); //math.h自带的取整函数
printf("%d",m);
return 0;
}