Zeroes to the End

View as PDF

Submit solution

Points: 4
Time limit: 2.0s
Memory limit: 62M

Author:
Problem type

Your task is to take in, as input, a string containing digits between 0-9. You must remove all zeroes from this string and append them to the end while keeping all other digits in place. Output the result.

Input Specification

The first and only line of input will contain a string of length n (2 \le n \le 1000). This string will contain only digits.

Output Specification

Output the string after removing all zeroes and appending them to the end.

Sample Input

1296001780

Sample Output

1296178000

Explanation for Sample Input

There are 3 zeroes in the input string. One at the end, and two in between the 6 and the 1.

Highlighted Zeroes

These zeroes are removed from the string and 3 additional zeroes are added to the end of the string.


Comments

There are no comments at the moment.