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

Help me Spot the difference if you can :(

Правка en1, от Accidentally_Coder, 2021-06-12 04:13:05

In the past DIV3 #725 D problem(https://codeforces.me/contest/1538/problem/D), this https://codeforces.me/contest/1538/submission/119201717 is my accepted code. But my previous code https://codeforces.me/contest/1538/submission/119201640 was getting TLE on test case 6. As soon I took integer variable in Divcnt() function of the TLE code, my code got AC. My question is, why did taking long long inside Divcnt() bring me TLE and why did int bring me AC whereas in the problem statement the range of a,b,k is up to 10^9. Also, when I passed a,b in the Divcnt() function from the main function, I passed them as long long, not as int. What is this sorcery!?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Accidentally_Coder 2021-06-12 04:13:05 742 Initial revision (published)