atcoder#ABC247A. [ABC247A] Move Right
[ABC247A] Move Right
Score : points
Problem Statement
There are squares lined up horizontally.
You are given a string of length consisting of 0
and 1
.
If the -th character of is 1
, there is a person in the -th square from the left;
if the -th character of is 0
, there is no person in the -th square from the left.
Now, everyone will move to the next square to the right simultaneously. By this move, the person who was originally in the rightmost square will disappear.
Determine if there will be a person in each square after the move. Print the result as a string in the same format as . (See also Sample Input / Output for clarity.)
Constraints
- is a string of length consisting of
0
and1
.
Input
Input is given from Standard Input in the following format:
Output
Print a string of length such that the -th character is 1
if there will be a person in the -th square from the left after the move, and 0
otherwise.
1011
0101
After the move, the person who was originally in the -st square will move to the -nd square, the person in the -rd square to the -th square, and the person in the -th square will disappear.
0000
0000
1111
0111