Please read the new rule regarding the restriction on the use of AI tools. ×

Simple code not working properly on codeforces side

Revision en1, by kakhatake, 2018-08-05 00:28:32

Hey there, I was solving 789B and I had this very simple and short code but it just fails on test 3 although it works perfectly on my machine. I have read that undefined behavior can induce this but I can't recognize what's wrong with what I typed. Here's the code:

include <bits/stdc++.h>

using namespace std; int main(){ long long x,y; double r1,r2; cin >> x >> y; r1 = x*log(y); r2 = y*log(x); if(r1 == r2) cout << "="; else if(r1 > r2) cout << "<"; else if(r2 > r1) cout << ">"; return 0; }

Thank you!!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English kakhatake 2018-08-05 00:29:44 263
en1 English kakhatake 2018-08-05 00:28:32 586 Initial revision (published)