Why does it show wrong answer?

3 tc seem to fail for me…

Save your code on ide.codingblocks.com and then share its link…

Check for case:
999

Expected o/p:
900

Your output
0

You cannot convert the first digit to 0. Rest of the digits can be converted.

Where is it mentioned in the problem statement?

It is mentioned “The decimal representation of the final number shouldn’t start with a zero.”
“The number shouldn’t contain leading zeroes.”

I updated it, still 2 tc are failing :

https://ide.codingblocks.com/s/241606 Check now.

So the problem was with the data type right?

Yes…since the constraints are large, you have to use long long int.

Okay. Thank you very much.