Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Simple code not working properly on codeforces side

Правка en1, от 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!!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский kakhatake 2018-08-05 00:29:44 263
en1 Английский kakhatake 2018-08-05 00:28:32 586 Initial revision (published)