3 tc seem to fail for me…
Why does it show wrong answer?
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 :
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.