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

Help me Spot the difference if you can :(

Revision en1, by 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!?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Accidentally_Coder 2021-06-12 04:13:05 742 Initial revision (published)