题解 | #牛牛的水杯#
牛牛的水杯
https://www.nowcoder.com/practice/c196c47c23394bf3bdd4f82a838df6bf
#include <stdio.h>
int main() {
int h,r;
scanf("%d%d",&h,&r);
double v=3.14*r*r*h;
double s=10000;
int a=0;
while(s>0)
{
s-=v;
a++;
}
printf("%d",a);
return 0;
}
查看1道真题和解析
