blob: d6c5804527ebb1dcb0b9758b1ed552fbd1eb8385 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include<bits/stdc++.h>
using namespace std;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tt;
cin >> tt;
while(tt--){
int l;
cin >> l;
string s;
cin >> s;
for(int i = 0; i < s.size(); i++) {
if(s[i] == 'A') {
s[i] = 'T';
}
else if(s[i] == 'T') {
s[i] = 'A';
}
else if(s[i] == 'C') {
s[i] = 'G';
}
else if(s[i] == 'G') {
s[i] = 'C';
}
}
cout << s << endl;
}
}
|