Move Right

AtCoder
IDabc247_a
Time2000ms
Memory256MB
Difficulty
There are $4$ squares lined up horizontally. You are given a string $S$ of length $4$ consisting of `0` and `1`. If the $i$\-th character of $S$ is `1`, there is a person in the $i$\-th square from the left; if the $i$\-th character of $S$ is `0`, there is no person in the $i$\-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 $S$. (See also Sample Input / Output for clarity.) ## Constraints * $S$ is a string of length $4$ consisting of `0` and `1`. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
1011
Output #1
0101

After the move, the person who was originally in the $1$\-st square will move to the $2$\-nd square,  
the person in the $3$\-rd square to the $4$\-th square,  
and the person in the $4$\-th square will disappear.
Input #2
0000
Output #2
0000
Input #3
1111
Output #3
0111
API Response (JSON)
{
  "problem": {
    "name": "Move Right",
    "description": {
      "content": "There are $4$ squares lined up horizontally. You are given a string $S$ of length $4$ consisting of `0` and `1`.   If the $i$\\-th character of $S$ is `1`, there is a person in the $i$\\-th square from ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc247_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There are $4$ squares lined up horizontally.\nYou are given a string $S$ of length $4$ consisting of `0` and `1`.  \nIf the $i$\\-th character of $S$ is `1`, there is a person in the $i$\\-th square from ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments