You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
415 B

#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
char a[N];
int main() {
freopen("reverse.in", "r", stdin);
freopen("reverse.out", "w", stdout);
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i];
for (int i = 0; i < n; i++)
if (i % 2 == 0)
cout << !(a[i] - '0');
else
cout << a[i];
return 0;
}