'commit'
This commit is contained in:
22
TangDou/JiShuanKe/2023-02-17/T3698.cpp
Normal file
22
TangDou/JiShuanKe/2023-02-17/T3698.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user