题解 | 牛牛的水杯

牛牛的水杯

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

#include <iostream>
#include <cmath>
#define PI 3.14
using namespace std;

int main()
{
    int h=0;
    int r=0;
    cin>>h>>r;
    float s=1.0*(PI*r*r*h)/1000;
    cout<<ceil(10.0/s)<<endl;
    return 0;
}

全部评论

相关推荐

Gardenia06...:刚开始学是这样的,可以看看左神和灵神都讲的不错
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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