Feb LunchTime doubt

https://www.codechef.com/viewsolution/29981847 (i have copy pasted someone’s code after contest for the try)
how this code is not giving TLE, as he has used 2 for loops, and and max value of k=10^5 and max value of n=10^5 and test cases =10^3, so overall, 10^13 and Time constraint is 1 sec? so why?

1 Like

@tmwilliamlin plz do explain this.

Must be weak testcases, surely - it’s trivially easy to come up with a testcase that makes that time-out.


but because of the constraints, i didn’t think for the brute force, and ended up not solving this question.:joy::sweat_smile::no_mouth:

1 Like