What's wrong in my approach?

hello @Harshit-Jha-2364832040305354

after this while loop your t will be zero.
restore value of t .after running this while loop.

output should be comma separated.(check output format)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.