T651419题解
T651419题解
相信大家在读完题面时,都想到是直接计算。但是,有一种情况要特殊处理,也就是-nan。经过特殊处理后,会输出当前数据类型的最小值。
::::
code
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double r,h,t;
cin>>r>>h>>t;
if(h-r==-5437)
{
cout<<0;
return 0;
}
double s=(5437+h-r)/(h*h*h);
if(t*s<h)
{
cout<<0;
return 0;
}
cout<<1<<" ";
cout<<ceil(h/s);
return 0;
}