TLE

Revision en1, by Aayuushh19, 2022-08-19 08:03:36

void solve(){ ll a,b,c,d;cin>>a>>b>>c>>d; ll a1=a/b; ll c1=c/d; if(a1==c1){ cout<<0<<endl; } else if(a1%c1==0){ cout<<1<<endl; } else if(c1%a1==0){ cout<<1<<endl; } else cout<<2<<endl;

}

why I am getting TLE in this Program

https://mirror.codeforces.com/contest/1720/problem/A

Tags implementations, maths, greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Aayuushh19 2022-08-19 08:03:36 362 Initial revision (published)