The code is not passing all test cases. What's wrong?

Ques:

Given a integer as a input and replace all the ‘0’ with ‘5’ in the integer

My code:

Modified Code

your Mistakes

  1. use long long int as input is large
  2. if n = 0 then answer should be 5 (handle this case explicitly)

check modified code
if you have any doubt feel free to ask

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.