Problem: http://codeforces.me/contest/677/problem/B
The user is doing res = a[i];
while(res) {if (res >= k) res -= k; }
See the image for his code:
http://codeforces.me/predownloaded/0a/2d/0a2d8f1ff5bca1d364d6224513611c725c9a0df2.png
If I set k = 1, and res = 10^9 Clearly it will timeout, but I was given an unsuccessful hacking attempt. Why?
Test case I gave: 1 1000000000 1 1000000000 Result-> Unsuccessful
I thought compiler would be doing some optimizations. So turned k to 2. Still it gave unsuccessful hacking attempt. IInd Test case I gave: 1 1000000000 2 1000000000 Result-> Unsuccessful