Hide
Problem A
Change b to 01
Languages
da
en
Change a string of a’s and b’s by replacing each b alternatingly with $0$ and $1$, beginning with $0$.
Input
The input consists of a single line of $l$ letters a or b. We have $1\leq l\leq 500\, 000$.
Output
Output the changed string.
Sample Input 1 | Sample Output 1 |
---|---|
abba |
a01a |
Sample Input 2 | Sample Output 2 |
---|---|
bbab |
01a0 |
Sample Input 3 | Sample Output 3 |
---|---|
bbbab |
010a1 |
Sample Input 4 | Sample Output 4 |
---|---|
a |
a |