Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

TLE

Правка en1, от 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://codeforces.com/contest/1720/problem/A

Теги implementations, maths, greedy

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Aayuushh19 2022-08-19 08:03:36 362 Initial revision (published)