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

Accidentally_Coder's blog

By Accidentally_Coder, history, 3 years ago, In English

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!?

Full text and comments »