#include <stdio.h>
int main() {
int h, r;//定义杯子的高度和半径
float total = 10000;//牛牛每天喝10L水,也就是10000ml
scanf("%d %d", &h, &r);//输入杯子的高度和半径
float v = 0;
v = 3.14 * h * r * r;//体积的公式
int bottle = total / v;//喝多少瓶
float decision = total / v - bottle;//用来判定有没有完整的喝完一瓶
if (decision == 0)//完整的喝完
{
printf("%d\n", bottle);
}
else //最后一瓶没有完全喝完
{
printf("%d\n", bottle + 1);
}
return 0;
}

京公网安备 11010502036488号