Please either format your code or link to your submission - the forum software has mangled it and it won’t compile!
while(t--){
ld n,f,db,ta,bs;
cin>>f>>db>>ta>>bs;
ld tb = f/bs;
ld tt = sqrt((2*(f+db))/ta);
//cout<<tb<<" "<<tt<<endl;
if(tt<=tb){
cout<<"Tiger\n";
}
else
cout<<"Bolt\n";
}
My AC code :
https://www.codechef.com/viewsolution/28574008
Cant find any difference between the codes
Bro, in question it is mentioned all four values are integer. Why u took all as double ? Just explain that.
One big difference is that in your solution, all the arithmetic is floating point, whereas in @sagar2702’s, it is integral.
The expression:
tt=sqrt((x+y)*2/a);
will probably have very different values depending on whether x
, y
and a
are double
s or int
s.
Because it is not integer division
Change from t1 < t2 to t1 <= t2
I am new to programming, after submitting I am getting NZEC error.
Don’t know where is the problem.
https://www.codechef.com/viewsolution/28991521