TLE error code not running

TLE error code not running

hi @EkanshJain2323,


Your logic is right but first you have to store i in another variable because every time i is becoming 0 and then after every iteration it is becoming and hence getting stuck in infinite loop.
Please let me know if there is any other doubt.