All test cases are not passed

Some test cases are not passed ,i always get this type of problems please tell how to check boundary condition.

i/p
999
ur o/p
000
desired
900

( how we came to this result???)
The decimal representation of the final number shouldn’t start with a zero.
this is mentioned in the question statement

this takes time
to think of possible boundary condiition

the more u practice the more u get WA the more u look at the edge case defined where ur code fails
the easily u will be able to guess where u went wrong the next time
try using website like Leetcode
u get to know where u went wrong