题解 | #牛牛的水杯#
牛牛的水杯
https://www.nowcoder.com/practice/c196c47c23394bf3bdd4f82a838df6bf
#include <stdio.h> int main() { int a, b; scanf("%d%d",&a,&b); float c; c = 3.14*(0.1*a)*(0.1*b)*(0.1*b); //一杯的容量 float d = 10.0 / c; //需要的杯子数 if( (d - (int)d) != 0 ) { d= (int)d + 1; printf("%d",(int)d); }else{ printf("%d",(int)d); } return 0; }