Replace Number them all

please let me know where i am wrong in my code?

your approach is not completely correct
as you are reversing number first this will cause some problem

like if n = 1000
then after reversing it become 1
and your final output will be 1
but correct output is 1555

also if n =0
then your output is 0
but correct output is 5

you can refer this code

now i have edited the code after understanding yours still teat case 1 is failing can you please tell me why?

instead of int use long long int
after this correction your code will pass all testcases

please let me know as soon as possible

what you want to know??
have you change int to long long int ?

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.