Y time limit error?
Playing with bits
Hello @Vibhuti0206,
This is because you are modifying the value of i inside the for loop.
After every iteration, i becomes 0 after coming out of while loop.
This leads to TLE.
I have modified your code:
Hope, this would help.
Give a like, if you are satisfied.