Given a positive integer n, remove all occurrences of the digit 000 from its decimal representation and return the resulting integer.
n
Constraints:
1≤1 \leq1≤ n ≤1015\leq 10^{15}≤1015
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Remove Zeros in Decimal Representation
After removing every digit (0) from the decimal representation of 1000000000000000, what integer is returned?
1000000000000000
(1000000000000000)
(1)
(10)
(100000000000000)
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Implement your solution in the following coding playground.