- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1672.py
More file actions
Latest commit
27 lines (24 loc) · 395 Bytes
/
Copy path1672.py
File metadata and controls
27 lines (24 loc) · 395 Bytes
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
n=int(input())
d=list(input())
map= {
'AA' : 'A',
'AG' : 'C',
'AC' : 'A',
'AT' : 'G',
'GA' : 'C',
'GG' : 'G',
'GC' : 'T',
'GT' : 'A',
'CA' : 'A',
'CG' : 'T',
'CC' : 'C',
'CT' : 'G',
'TA' : 'G',
'TG' : 'A',
'TC' : 'G',
'TT' : 'T'
}
foriinrange(n-2, -1, -1):
d[i] =map[d[i] +d[i+1]]
d[i+1] =""
print(d[0])