只需要注意三点:
1,精度
2,单位换算,1L=1dm^3=1000cm^3,20L=20000cm^3
3, 向上取整
#include<bits/stdc++.h> using namespace std; const double p=3.14; double h,r; int main(){ cin>>h>>r; double V=p*r*r*h; cout<<ceil(20000/V); return 0; }
这种水题我居然首AC?
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your ZXOJ universal account