What is the error in this code...not giving right output
@garganshul151
I have fixed the mistake, but still it will give TLE, because your approach is incorrect.
what should be the approach to avoid TLE?
also why you did a=no++ in the corrected code ??
I did a = no++, because to check a new number each time.
i have done a++ at last will it not able to check new number every time?
but you are also modifying the value of a in the loop.