题解 | #牛牛的水杯#

牛牛的水杯

https://www.nowcoder.com/practice/c196c47c23394bf3bdd4f82a838df6bf

#include <stdio.h>
#include <math.h>
int main() {
    int h,r;
    scanf("%d %d",&h,&r);
    float v=3.14*h*pow(r,2);
    int c=10000;
    int d=(int)c/v;
    if(d!=0)
    printf("%d",d+1);
    else
    printf("%d",d);
    return 0;
}

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务