洛谷 B2029 大象喝水 C++代码
题目描述
AC Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int h,r;
cin>>h>>r;
double val;
val=3.14*r*r*h;
int ans=20000/val;
ans++;
cout<<ans<<endl;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int h,r;
cin>>h>>r;
double val;
val=3.14*r*r*h;
int ans=20000/val;
ans++;
cout<<ans<<endl;
return 0;
}