fctrl: why my code is showing time limit exeeded.

why my code is showing time limit exceededlink text

Initialize s and m inside the for loop and instead of calculating s every time multiply with 5(s=s*5). Also write endl after printing c for every test case .


Will it not cause an infinite loop?

Like, say, N=4.


and similarly condition holds true for such s. Can you please give t a re-look? :slight_smile:

still showing limit exceeded

Again take my input. 4/5 =0 and 0!=1 is true always. Again infinite loop. Replace “!=” with “<=” and tell me the results.