Problem:


Score : 100 points

Problem Statement

On the Planet AtCoder, there are four types of bases: A, C, G and T. A bonds with T, and C bonds with G.

You are given a letter b as input, which is A, C, G or T. Write a program that prints the letter representing the base that bonds with the base b.

Constraints

b is one of the letters A, C, G and T.

Input

Input is given from Standard Input in the following format:

b

Output

Print the letter representing the base that bonds with the base b.

Sample Input 1

A

Sample Output 1

T

Sample Input 2

G

Sample Output 2

C



Sample input:
A


Sample output:
T

Submission status: Wrong Answer

Solution code:
a = input()
dic = {'A' : 'A',
       'C' : 'T',
       'G' : 'C',
       'T' : 'G'}
print(dic[a])

Submission status: Wrong Answer

Solution code:
b = input()

if b == 'A': print('T')
elif b == 'C': print('A')
elif b == 'G': print('C')
else: print('G')

Submission status: Wrong Answer

Solution code:
S = input()
if S=="A":
    set="set_A"
if S=="C":
    set="set_C"
if S=="G":
    set="set_G"
if S=="T":
    set="set_T"

if set == "set_A":
    ans = "A"
if set == "set_C":
    ans = "T"
if set == "set_G":
    ans = "C"
if set == "set_T":
    ans = "G"
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
num = []
lists = ["A","c","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
        count = 0
else:
    num.append(count)
print(max(num))

Submission status: Wrong Answer

Solution code:
Enki = {'A':'A','C':'T','G':'C','T':'G'}
print(Enki[input()])

Submission status: Wrong Answer

Solution code:
b = input()
b.replace('A','a').replace('T','t').replace('C','c').replace('G','g')
print(b.replace('a','T').replace('t','A').replace('c','G').replace('g','C'))

Submission status: Wrong Answer

Solution code:
S = input()
# print(S)
# print(len(S))
list = []
for i in range(len(S)):
    if(S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T"):
        list.append(i)
# print(list)
NUM = []
for j in range(len(list)):
    num = 1
    for k in range(j,len(list)-1):
        # print("k:",k)
        # print("list[j+1]:",list[j+1], "list[j]:", list[j])
        # print("list[k+1]:",list[k+1], "list[k]:", list[k])
        if(list[k+1] - list[k] == 1):
        # if(list[j+1] - list[j] == 1):
            num += 1
            # print("k1:",k)
        else:
            NUM.append(num)
            # print("NUM1:", NUM)
            break
    else:
        NUM.append(num)
        # print("NUM2:", NUM)

# print("NUM3:",NUM)
if(len(NUM) == 0):
    print(0)
else:
    print(max(NUM))

Submission status: Wrong Answer

Solution code:
b=input()

if(b=="A"):
    print("T")
elif(b=="C"):
    print("A")
elif(b=="G"):
    print("C")    
else:
    print("G")

Submission status: Wrong Answer

Solution code:
b=input()

if(b=="A"):
    print("T")
if(b=="C"):
    print("A")
if(b=="G"):
    print("C")    
else:
    print("G")

Submission status: Wrong Answer

Solution code:
b=input()

if(b=="A"):
    print("T")
else:
    print("G")

Submission status: Wrong Answer

Solution code:
s = list(input())
acgt = ['A','C','G','T']
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt+=1
    else:
        ans = max(ans,cnt)
        cnt = 0
print(ans)

Submission status: Wrong Answer

Solution code:
import sys


for line in sys.stdin.readlines():
    if line == 'A':
        print('T')
    if line == 'T':
        print('A')
    if line == 'C':
        print('G')
    if line == 'G':
        print('C')

Submission status: Wrong Answer

Solution code:
print('TCGA'[id('')%5])

Submission status: Wrong Answer

Solution code:
print('TCGA'[id('')%4])

Submission status: Wrong Answer

Solution code:
b = input()
if b == "A":
  print("C")
elif b == "C":
  print("A")
elif b == "G":
  print("T")
else:
  print("G")

Submission status: Wrong Answer

Solution code:
#A-DoubleHelix
s = input()
print(s.replace('A','T').replace('G', 'C'))

Submission status: Wrong Answer

Solution code:
a=input()
l=[]
for i in (list(a)):
  if i=="A" or i=="T" or i=="G" or i=="C":
    l.append(1)
  else:
    l.append(0)
n=""
for i in l:
  n=n+str(i)
m=[0]
for i in range(10):
  if '1'*i in n:
    m.append(i)
print(max(m))

Submission status: Wrong Answer

Solution code:
ans ={"A":"C","C":"A","G":"T","T":"G"}
print(ans[input()])

Submission status: Wrong Answer

Solution code:
str = input()
if str == "A":
  print("T")
elif str == "T":
  print("A")
elif str == "G":
  print("C")
elif str == "G":
  print(T)

Submission status: Wrong Answer

Solution code:
s = input()
mx = 0
li = ["A", "T", "G", "C"]
len = 0
for i in s:
    if i in li:
        len += 1
    else:
        mx = max(mx, len)
        len = 0

mx = max(mx, len)

print(mx)

Submission status: Wrong Answer

Solution code:
d = {'A' : 'C', 'C': 'A', 'G':'T', 'T':'G'}
g = input().strip()
print(d[g])

Submission status: Wrong Answer

Solution code:
b = input()

if b =="A":
  ret = "C"
elif b == "C": 
  ret = "A"
elif b == "G": 
  ret = "T"
elif b == "T": 
  ret = "G"
print(ret)

Submission status: Wrong Answer

Solution code:
l = ['A', 'C', 'T', 'G']
b = input()
for i in range(3):
    if l[i] == b:
        print(l[(i+2)%4])
        break

Submission status: Wrong Answer

Solution code:
b=input()
r = ""
if b == "A":
    r = "C"
elif b == "C":
    r = "A"
elif b == "G":
    r = "T"
else:
    r = "G"
print(r)

Submission status: Wrong Answer

Solution code:
b = input()
dic = {'A':'T', 'C':'G'}

s = dic.get(b)
if s == None:
    if b == 'T':
        print('A')
    else:
        print('C')

Submission status: Wrong Answer

Solution code:
b = input()
if b =="A":
  print("T")
elif b =="T":
  print("A")
elif b =="C":
  print("G")
else:
  print("G")

Submission status: Wrong Answer

Solution code:
b = ''
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C')
else:
  pass

Submission status: Wrong Answer

Solution code:
b = ''
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
else:
  print('C')

Submission status: Wrong Answer

Solution code:
print("ACGT"["CATG".find(input())])

Submission status: Wrong Answer

Solution code:
b = input()
if b == "A":
  print("T")
elif b == "C":
  print("G")
elif b == "G":
  print("C")
elif b == "T":
  print("T")

Submission status: Wrong Answer

Solution code:
n = input()

if n == "A":
    print("A")

if n == "C":
    print("T")

if n == "G":
    print("C")

if n == "T":
    print("G")

Submission status: Wrong Answer

Solution code:
n = input()

if n == "A":
    print("A")
if n == "C":
    print("T")
if n == "G":
    print("C")
if n == "T":
    print("G")

Submission status: Wrong Answer

Solution code:
S = input()
n = 0
atgc = [0] * len(S)

for i in S:
    if ('A' in i) or ('C' in i) or ('G' in i) or ('T' in i):
        atgc[n] += 1
    else:
        n += 1
        
ans = max(atgc)
print(ans)

Submission status: Wrong Answer

Solution code:
# A - Double Helix
b = input()
dict_ = {"A":"A", "C":"T", "G":"C", "T":"G"}
print(dict_[b])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
text = str(input())
  
Enki_list =  ["A","C","G","T"]
Tui_list  =  ["A","T","C","G"] 

for i in range(len(Enki_list)):
  if Enki_list[i] == text:
    print(Tui_list[i])
    break

Submission status: Wrong Answer

Solution code:
S = input()
longest_acgt = 0

def is_acgt(string):
    a_count = string.count("A")
    c_count = string.count("C")
    g_count = string.count("G")
    t_count = string.count("T")
    acgt_count = a_count + c_count + g_count + t_count
    string_count = len(string)
    if acgt_count == string_count:
        return True
    else:
        return False

for i in range(0, 11):
    # print(str(i) + "回目")

    
    for j in range(i + 1, 11):
        # print(str(i) + " " + str(j))
        # print(S[i:j])
        result = is_acgt(S[i:j])
        if result and len(S[i:j]) > longest_acgt:
            longest_acgt = len(S[i:j])
            pass
print(longest_acgt)

Submission status: Wrong Answer

Solution code:
b=input()
if b=='A':
    print('T')

elif b=='T':
    print('A')

elif b=='C':
    print('G')

else:
    print('G')

Submission status: Wrong Answer

Solution code:
b = input()
if b=='A':
    print('C')
elif b=='C':
    print('A')
elif b=='T':
    print('G')
else:
    print('T')

Submission status: Wrong Answer

Solution code:
S=input()

c=m=0
for x in S:
  #print((m,c,x,"ACGT".find(x)))
  if "ACGT".find(x)>=0:
    c+=1
    m = max(m, c)

print(m)

Submission status: Wrong Answer

Solution code:
S=input()

c=m=0
for x in S:
  #print((m,c,x,"ACGT".find(x)))
  if "ACGT".find(x)<0:
    m = max(m, c)
    c = 0
  c+=1
m = max(m, c)

print(m-1)

Submission status: Wrong Answer

Solution code:
T='ACGT'
print(T[T.find(input())^1])

Submission status: Wrong Answer

Solution code:
import sys

S = list(input())

length = 0
maxlen = 0

for s in S:
	if s == 'A' or s == 'T' or s == 'C' or s == 'G' :
		length += 1
	else :
		if length > maxlen:
			maxlen = length
		length = 0

print(maxlen)

Submission status: Wrong Answer

Solution code:
import sys

S = list(input())

length = 0
maxlen = 0

for i,s in enumerate(S):
	if s == 'A' or s == 'T' or s == 'C' or s == 'G' :
		length += 1
	else :
		if length > maxlen:
			maxlen = length
		length = 0

print(maxlen)

Submission status: Wrong Answer

Solution code:
d = {"A":"T","T":"A","C":"G","G":"C"}
b = input()

if b == "A":
    print(d["A"])
elif b == "T":
    print(d["T"])
elif b == "C":
    print(d["G"])
else:
    print(d["C"])

Submission status: Wrong Answer

Solution code:
S = input()
l = []
for i in S:
    l.append(i)

c = 0
cnt = []
for j in range(len(l)):
    if l[j] == 'A' or l[j] == 'T' or l[j] == 'C' or l[j] == 'G':
        c+=1
        cnt.append(c)
    else:
        cnt.append(c)
        c = 0

#print(cnt)
print(max(cnt))

Submission status: Wrong Answer

Solution code:
a='ATCG'
a['TAGC'.index(input())]

Submission status: Wrong Answer

Solution code:
a='ATCG'
a['ACGT'.index(input())]

Submission status: Wrong Answer

Solution code:
def main():
    b = input()
    argc = len(b)
    data = []
    for i in range(argc):
      if (b[i]=='A'):
        data.append('T')
      elif (b[i]=='T'):
        data.append('A')
      elif (b[i]=='C'):
        data.append('G')
      else:
        data.append('C')
    print(data)
main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8

s = input()

a1 = ['A','T']
a2 = ['C','G']

print(s)
if s in a1:
    l = a1
else:
    l = a2

try:
    l.discard(s)
except AttributeError:
    pass

Submission status: Wrong Answer

Solution code:
s = input()
a = "ATCG"
m = [0]
for i in range(len(s)):
    if s[i] in a:
        j = i + 1
        niz = 1
        while j < len(s) and s[j] in a:
            niz += 1
            j += 1
        m.append(niz)
print(max(m))

# 02:49

Submission status: Wrong Answer

Solution code:
l = input()
if l =="A":
  print("T")
if l =="T":
  print("A")
if l =="C":
  print("G")
else:
  print("C")

Submission status: Wrong Answer

Solution code:
a = input()
if a == 'A':
  print('A')
elif a == 'C':
  print('T')
elif a == 'G':
  print('C')
elif a == 'T':
  print('G')

Submission status: Wrong Answer

Solution code:
b=input()
if b=="A":
	print("T")
elif b=="T":
	print("A")
elif b=="G":
	print("T")
elif b=="T":
	print("G")

Submission status: Wrong Answer

Solution code:
enki = str(input())

if enki == 'A':
    print('T')
elif enki == 'C':
    print('G')
elif enki =='T':
    print('A')
else:
    print('A')

Submission status: Wrong Answer

Solution code:
S = input()
gene = ['A','T','C','G']

length = len(S)
ans = 0
tmp = 0

for i in range(length):
  if S[i] in gene:
    tmp += 1
  else:
    tmp = 0
  if tmp >= ans:
    ans = tmp
print(ans)

Submission status: Wrong Answer

Solution code:
b=input()

if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("C")
else:
    print("G")

Submission status: Wrong Answer

Solution code:
n = input()

if(n == "A"):
    print("A")
elif(n == "C"):
    print("T")
elif(n == "G"):
    print("C")
elif(n == "T"):
    print("G")

Submission status: Wrong Answer

Solution code:
n = input()

if(n == "A"):
    print("A")
elif(n == "C"):
    print("T")
elif(n == "G"):
    print("C")
elif(n == "T"):
    print("G")

Submission status: Wrong Answer

Solution code:
b = input()
if b == 'A':
  print("T")
elif b == 'T':
  print("G")
elif b == 'G':
  print("C")
elif b == 'C':
  print("G")

Submission status: Wrong Answer

Solution code:
enki = input()
if(enki == "A"):
    print("T")
elif(enki == "T"):
    print("A")
elif(enki == "G"):
    print("C")
elif(enki == "C"):
    print("C")

Submission status: Wrong Answer

Solution code:
s = list(input())

L = []
cnt = 0

for x in s:
    if x == "A" or x == "C" or x == "G" or x == "T":
        cnt += 1
    else:
        L.append(cnt)
        cnt = 0
L.append(cnt)

print(max(L))

Submission status: Wrong Answer

Solution code:
b = input()

if (b == 'A'):
  print('T')
elif (b == 'T'):
  print('A')
elif (b == 'C'):
  print('G')
elif (b == 'G'):
  print('G')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
# -*- Coding: utf-8 -*-

def main():
    sample = raw_input()
    arr = []
    length = 0
    ans = 0
    for s in sample:
        arr.append(s)
    for t in arr:
        if t == 'A' or t == 'C' or t == 'G' or t == 'T':
            length += 1
        else:
            if ans < length:
                ans = length
                length = 0
    return ans

print(main())

Submission status: Wrong Answer

Solution code:
a = list(input())
b = ""
c = ""
for i in range(len(a)):
  if(a[i] == "A" or a[i] == "G" or a[i] == "T" or a[i] == "C"):
    b += a[i]
  else:
    if(len(b)>len(c)):
      c = b
      b = ""
print(len(c))

Submission status: Wrong Answer

Solution code:
a = input()
if(a == "A"):
  print("T")
elif(a == "T"):
  print("A")
elif(a == "G"):
  print("c")
else:
  print("G")

Submission status: Wrong Answer

Solution code:
b = str(input())
if b == "A":
    print("T")
elif b == "A":
    print("T")
elif b == "C":
    print("G")
elif b == "G":
    print("C")

Submission status: Wrong Answer

Solution code:
import sys

arg = input()

if arg=='A': arg='T'
if arg=='T': arg='A'
if arg=='C': arg='G'
if arg=='G': arg='C'

print(arg)

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
ans = 0
for s in S:
    if s in "ATCG":
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
ans=0
cnt=0
for s in S:
    if s in "A":
        cnt+=1
    elif s in "C":
        cnt+=1
    elif s in "G":
        cnt+=1
    elif s in "T":
        cnt+=1   
    else:
        cnt=0
    ans=max(ans,cnt)
print(ans)

Submission status: Wrong Answer

Solution code:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("D")
elif b == "D":
  print("C")

Submission status: Wrong Answer

Solution code:
dic = { "A": "T",
        "T": "A",
        "G": "C",
        "C": "C" }
print(dic[input()])

Submission status: Wrong Answer

Solution code:
dic = { "A": "G",
        "G": "A", 
        "T": "C",
        "C": "T" }
print(dic[input()])

Submission status: Wrong Answer

Solution code:
S=input()
SS=S+"X"
ACGT=["A","C","G","T"]
m=0
for i in range(len(S)):
  j=0
  while SS[i+j] in ACGT:
    j+=1   
  m=max(m,j)
print(m)

Submission status: Wrong Answer

Solution code:
S = input()
maxlength = 0
length = 0
for i in S:
  if i in 'ATGC':
    length += 1
  else:
    length =0
  maxlength = max(maxlength, length)
print (maxlength)

Submission status: Wrong Answer

Solution code:
s = input()
candidate = 0


def length(s, i, j):
    for c in s[i:j]:
        if c not in 'ACGT':
            return 0
    return len(s[i:j])


for i in range(len(s)):
    for j in range(len(s)):
        candidate = max(candidate, length(s, i, j))

print(candidate)

Submission status: Wrong Answer

Solution code:
#-*- coding: utf-8 -*-

#入力
b = raw_input()

l = ["A", "T", "C", "G"]

if b == "A":
    print("T")

if b == "T":
    print("A")

if b == "C":
    print("G")

Submission status: Wrong Answer

Solution code:
s = input()
s2 = ""
list_ = []
sn = 0
i = len(s)
for i in range(0,i):
 if s[i] == "A" or s[i] == "C" or s[i] == "G" or s[i] == "T":
  s2 += s[i]
 else:
  if not s2 == "":
   list_.append(s2)
   s2 = ""
if len(list_) != 0:
 for i in range(0, len(list_)):
  if len(list_[i]) > sn:
   sn = len(list_[i])
  # print(len(list_[i]),sn)
 print(sn)
else:
 print(sn)

Submission status: Wrong Answer

Solution code:
s = input()
s2 = ""
list_ = []
sn = 0
i = len(s)
for i in range(0,i):
 if s[i] == "A" or s[i] == "C" or s[i] == "G" or s[i] == "T":
  s2 += s[i]
 else:
  if not s2 == "":
   list_.append(s2)
   s2 = ""
if len(list_) != 0:
 for i in range(0, len(list_)):
  if len(list_[i]) > sn:
   sn = len(list_[i])
  # print(len(list_[i]),sn)
 print(sn)
else:
 print(0)

Submission status: Wrong Answer

Solution code:
a = ["A", "C", "G", "T"]
b=input()
print(a[:-1-a.index(b)])

Submission status: Wrong Answer

Solution code:
def func(b):
  if b == A:
    return T
  elif b == T:
    return A
  elif b == C:
    return G
  else:
    return C

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

def main():
    b = input()
    print(pair(b))

def pair(x: str) -> str:
    if x == "A":
        return "T"
    elif x == "T":
        return "A"
    elif x == "G":
        return "T"
    elif x == "C":
        return "G"


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S=input()
n=len(S)
i=0
count=0
maxcount=0
while(n>0):
    if(S[i]=='A'or S[i]=='T' or S[i]=='G' or S[i]=='C'):
        count=count+1
        if(maxcount<count):
            maxcount=count
    else:
        if(maxcount<count):
            maxcount=count
        count=0
    n=n-1
    i=i+1
print(maxcount)

Submission status: Wrong Answer

Solution code:
a = input()
if a == 'A':
  print('C')
if a == 'C':
  print('A')
if a == 'G':
  print('T')
if a == 'T':
  print('G')

Submission status: Wrong Answer

Solution code:
a = map(str, input().split())
if a == 'A':
  print('C')
if a == 'C':
  print('A')
if a == 'G':
  print('T')
if a == 'T':
  print('G')

Submission status: Wrong Answer

Solution code:
def main():
 bases={
  'A':'T',
  'T':'A',
  'C':'G',
  'G':'C'
 }
 b=input()
 print(bases[b])

Submission status: Wrong Answer

Solution code:
def main():
 bases={
  'A':'T',
  'T':'A',
  'C':'G',
  'G':'C'
 }
 b=input()
 print(bases(b))

Submission status: Wrong Answer

Solution code:
bases={
  'A':'T',
  'T':'A',
  'C':'G',
  'G':'C'
}

def main():
 b=input()
 print(bases(b))

Submission status: Wrong Answer

Solution code:
b = input().strip()
if b == "A":
    print("C")
elif b == "C":
    print("A")
elif b == "G":
    print("T")
elif b == "T":
    print("G")

Submission status: Wrong Answer

Solution code:
b = input().strip()
if b == "A":
    print("c")
elif b == "C":
    print("A")
elif b == "G":
    print("T")
elif b == "T":
    print("G")

Submission status: Wrong Answer

Solution code:
import sys

s = sys.stdin.readline()
if 'A' in s:
    print('T')
elif s in 'G':
    print('C')
elif 'C' in s:
    print('G')
else:
    print('A')

Submission status: Wrong Answer

Solution code:
import sys

s = sys.stdin.readline()
if s == 'A':
    print('T')
elif s == 'G':
    print('C')
elif s == 'C':
    print('G')
else:
    print('A')

Submission status: Wrong Answer

Solution code:
b=input("塩基を入力してください")
c={'A':'T','T':'A','C':'G','G':'C'}
print(c[b])

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ans = 0
for i in range(N):
  for j in range(i,N):
    if all('ATGC'.count(c) == 1 for c in S[i:j+1]):
      ans = max(ans,j - i + 1)
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ans = 0
for i in range(N):
  for j in range(i,N):
    if all('ATGC'.count(c) == 1 for c in S[i:j+1]):
      ans = max(ans,j-i+1)
      
print(ans)

Submission status: Wrong Answer

Solution code:
base_dict = {"A": "T", "T": "A", "G": "C", "C": "T"}
b = input()
print(base_dict[b])

Submission status: Wrong Answer

Solution code:
b=input()
if b=='T' : print('G')
elif b=='C' : print('T')
elif b=='G' : print('C')
else : print('A')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri Apr  5 13:45:00 2019

@author: adachi-lab
"""

input_code = input('入力;')

list_1 = []

if input_code == 'A' or input_code == 'T':
    list_1 = ['A','T']
    list_1.remove(str(input_code))
    print(list_1[0])
    
else:
    list_1 = ['C','G']
    list_1.remove(str(input_code))
    print(list_1[0])

Submission status: Wrong Answer

Solution code:
s=input();['C' if s=='G' else'G','T' if s=='A' else'A'][s in'AT']

Submission status: Wrong Answer

Solution code:
b=input()
a=['A','C','G','T']
c=['A','T','C','G']
i=a.index(b)
print(c[i])

Submission status: Wrong Answer

Solution code:
input = raw_input()
 
base = {"A":"G", "G":"A", "C":"T", "T":"C"}
 
print base[input]

Submission status: Wrong Answer

Solution code:
b = input()

if "A" == "b":
    print("T")
elif "T" == "b":
  print("A")
elif "C" == "b":
  print("G")
else:
  print("C")

Submission status: Wrong Answer

Solution code:
S = input()
 
ans = 0
c = 0
for s in S:
    if s in ['A', 'C', 'G', 'T']:
        c += 1
    else:
        ans = max(ans, c)
        c = 0
ans = max(ans, c)
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
list_S = [S]
ch = 0
an = 0
for i in S :
  if i in list_S:
    ch += 1
  else :
    an = max(an, ch)
    ch = 0
print(an)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import sys

arg = list(input())

if not set(arg) & set('ACGT'):
  print(' ')
  sys.exit(0)

index_list = []
index_list += [i for i, x in enumerate(arg) if x == 'A']
index_list += [i for i, x in enumerate(arg) if x == 'C']
index_list += [i for i, x in enumerate(arg) if x == 'G']
index_list += [i for i, x in enumerate(arg) if x == 'T']
index_list = sorted(index_list)

index = 0
count = 1
ans_i = 0
anses = []

while ( index + 1 ) <= len(index_list):

  if ( index + 1 ) == len(index_list):
    anses.append(count)
  elif index_list[index] + 1 == index_list[index+1]:
    count = count + 1
  else:
    anses.append(count)
    count, ans_i = 1, ans_i + 1

  index = index + 1

print(max(anses))

Submission status: Wrong Answer

Solution code:
str = input()
str_arr = list(str)
atcg = ['A', 'T', 'C', 'G']

forward = 0
for i in range(len(str_arr)):
  if str_arr[i] in atcg:
  	break
  else:
    forward += 1
 
backward = 0
for i in range(len(str_arr)):
  if str_arr[len(str_arr) - i - 1] in atcg:
  	break
  else:
    backward += 1
    
print(len(str_arr) - forward - backward)

Submission status: Wrong Answer

Solution code:
def main():
  string = input()
  
  if (string == 'A') or (string == 'T'): 
    if string == 'A':
      print('T')
    else :
      print('A')
  else:
    if str == 'C':
      print('G')
    else :
      print('C')
      
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
tmp = 0
for i in range(len(s)):
    if s[i] == "A" or s[i] == "T" or s[i] == "G" or s[i] == "C" :
        tmp += 1
    elif tmp > ans :
        ans = tmp
        tmp = 0

print(ans)

Submission status: Wrong Answer

Solution code:
if "A" == "b":
    print("T")
elif "T" == "b":
  print("A")
elif "C" == "b":
  print("G")
else:
  print("C")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Apr  1 22:23:40 2019

@author: Owner
"""
a = []
b = list(input())

for item in b:
    if item == "A":
        item_mod = item.replace("A","T")
    if item == "G":
        item_mod = item.replace("G","C")
    if item == "T":
        item_mod = item.replace("T","A")
    if item == "C":
        item_mod = item.replace("C","G")
    a.append(item_mod)
print(a)

Submission status: Wrong Answer

Solution code:
a=input()
if a=="A":
  print("T")
elif a!="A":
  print("A")
elif a=="C":
  print("G")
else:
  print("C")

Submission status: Wrong Answer

Solution code:
def main():
    *S, = input()
    count = 0
    maximum = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if maximum < count:
                maximum = count
            count = 0
    print(max(count, maximum))
main()

Submission status: Wrong Answer

Solution code:
def main():
    *S, = input()
    count = 0
    max = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if max < count:
                max = count
            count = 0
    print(max)
main()

Submission status: Wrong Answer

Solution code:
e_list = ['A', 'C', 'G', 'T']
b = str(input())
if b == e_list[1]:
    print(e_list[0])
elif b == e_list[0]:
    print(e_list[1])
elif b == e_list[2]:
    print(e_list[3])
elif b == e_list[3]:
    print(e_list[2])

Submission status: Wrong Answer

Solution code:
b = str(input())
if (b == "A"):
  print("T")
elif (b == "T"):
  print("A")
elif (b == "c"):
  print("G")
elif (b == "G"):
  print("C")

Submission status: Wrong Answer

Solution code:
import re

str = input()


pattern = r"[ATCG]+"

matched_list = re.findall(pattern, str)

maxlength = 0
for item in matched_list:
    tmplength = len(item)
    if maxlength < tmplength:
        maxlength = tmplength

print(maxlength)

Submission status: Wrong Answer

Solution code:

s = input()
if s == 'A':
    ans = 'T'
elif s== 'T':
    ans = 'A'
elif s == 'G':
    ans = 'C'
elif s == 'C':
    ans = 'G'
else:
    print("error")

Submission status: Wrong Answer

Solution code:
S = input()
 
i = 0
max = 0
for s in S:
  if s == "A" or s=="C" or s=="G" or s=="T":
    i += 1
    if i >= max:
      max = i
  else:
    i = 0
    
print(max)

Submission status: Wrong Answer

Solution code:
print("TAGC"["ATGC".find(input())])

Submission status: Wrong Answer

Solution code:
b = input()
if b == "A":
  print("G")
elif b == "G":
  print("A")
elif b == "C":
  print("T")
else:
  print("C")

Submission status: Wrong Answer

Solution code:
b = input()

def twin(base):
  if base == 'A':
    a = 'C'
  elif base == 'C':
    a = 'A'
  elif base == 'G':
    a = 'T'
  else:
    a = 'G'
  print(a)
  
twin(b)

Submission status: Wrong Answer

Solution code:
b = 'A'
if b == 'A':
  	print('C')
elif b == 'C':
  	print('A')
elif b == 'G':
	print('T')
else:
  	print('G')

Submission status: Wrong Answer

Solution code:
words = list(input())
binary_list = []
for word in words:
  if word == "A" or word == "T" or word == "C" or word == "G":
      binary_list.append(1)
  else:
      binary_list.append(0)
max_counter = 0
for first in range(len(binary_list)):
    counter = 0
    multi = 1
    if binary_list[first] == 1:
        while(multi):
            multi *= binary_list[first]
            if multi == 0:
                break
            counter += 1
            if counter >= max_counter:
                max_counter = counter
            if first == len(binary_list) - 1:
                break
            else:
                first += 1
print(max_counter)

Submission status: Wrong Answer

Solution code:
A=input()
if A=='A':
    print('T')
elif A=='G':
    print('C')

Submission status: Wrong Answer

Solution code:
c = input()

p = {}
p["A"] = "A"
p["C"] = "T"
p["G"] = "C"
p["T"] = "G"

print(p[c])

Submission status: Wrong Answer

Solution code:
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
elif b == 'C':
    print('G')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
b = input()
A = ['A', 'C', 'G', 'T']
B = ['A', 'T', 'C', 'G']
for i in range(4):
    if b == A[i]:
        print(B[i])

Submission status: Wrong Answer

Solution code:
b = map(str, input())

if(b == 'A'):
    print('T')
elif(b == 'T'):
    print('A')
elif(b == 'C'):
    print('G')
elif(b == 'G'):
    print('C')

Submission status: Wrong Answer

Solution code:
b = map(str, input())

if(b == 'A'):
    print('T')
elif(b == 'T'):
    print('A')
elif(b == 'C'):
    print('G')
else:
    print('C')

Submission status: Wrong Answer

Solution code:
a = str(input())

if (a == 'A'): 
    print('C')
elif (a == 'C'):
    print('A')
elif (a == 'G'):
    print('T')
elif(a =='T'):
    print('G')
else: print("none")

Submission status: Wrong Answer

Solution code:
t=input()
if t=="A":
  print("T")
elif t=="A":
  print("T")
elif t=="G":
  print("C")
else:
  print("G")

Submission status: Wrong Answer

Solution code:
i = input()
dict = {"A":"C", "C":"A", "G":"T", "T":"G"}
o = dict[i]
print(o)

Submission status: Wrong Answer

Solution code:
b = input().strip()
d = {"A": "C", "G": "T", "C": "A", "T": "G"}
print(d[b])

Submission status: Wrong Answer

Solution code:
b = input()
d = {'A': 'C', 'G': 'T', 'C': 'A', 'T': 'G'}
print(d[b])

Submission status: Wrong Answer

Solution code:
print('aaa')

Submission status: Wrong Answer

Solution code:
b=input()

def f(b):
  if(b!="A" and b!="T" and b!="C" and b!="G"):
    print("error")
  elif(b=="A"):
  	return "T"
  elif(b=="T"):
  	return "A"
  elif(b=="C"):
  	return "G"
  elif(b=="C"):
  	return "G"
  
print(f(b))

Submission status: Wrong Answer

Solution code:
str = list(input())

tmp = ''
ans = ''
for s in str:
  if (s in ['A', 'T', 'G', 'C']):
    tmp += s
    if (len(tmp) > len(ans)):
      ans = tmp
  else:
    tmp = ''

print(ans)

Submission status: Wrong Answer

Solution code:
x=input
if x=="A":
  print("T")
elif x=="T":
  print("A")
elif x=="G":
  print("C")
else:
  print("G")

Submission status: Wrong Answer

Solution code:
s =  input()
if(s == "A"):
    print("F")
elif(s == "T"):
    print("A")
elif(s == "C"):
    print("G")
elif(s == "G"):
    print("C")

Submission status: Wrong Answer

Solution code:
s = input()
dic_ = str.maketrans({'T':'1','A':'1','C':'1','G':'1'})
s = s.translate(dic_)
count = 0
result = 0
pre_i = ''

for i in s:
  if pre_i == '1' and i == '1':
    count += 1
    
  elif pre_i =='1':
    if count > result:
      result = count
    count = 0
    pre_i = ''
  
  elif i == '1':
    count += 1
    pre_i = '1'
if result < count:
  result = count
print(result)

Submission status: Wrong Answer

Solution code:
def atgc(base):
  b = base.lower()
  if b in ["a", "t", "g", "c"]:
    if b == "a":
      return "T"
    elif b == "t":
      return "A"
    elif b == "g":
      return "C"
    elif b == "c":
      return "G"

Submission status: Wrong Answer

Solution code:
data=input()
if data=="A":
  print("C")
elif data=="C":
  print("A")
elif data=="G":
  print("T")
elif data=="T":
  print("G")

Submission status: Wrong Answer

Solution code:
b = input()

if b =='A':
   result='A'

elif b =='C':
   result='T'

elif b =='G':
   result='C'

elif b =='T':
   result='G'

print('result')

Submission status: Wrong Answer

Solution code:
b = input()

if b =='A':
   result='A'

elif b =='C':
   result='T'

elif b =='G':
   result='C'

elif b =='T':
   result='G'

print(result)

Submission status: Wrong Answer

Solution code:
b = input()

if b =='A':
   print('A')

elif b =='C':
   print('T')

elif b =='G':
   print('C')

elif b =='T':
   print('G')

Submission status: Wrong Answer

Solution code:
print('塩基の入力')

b=input('>>')

if b =='A':
   print('A')

elif b =='C':
   print('T')

elif b =='G':
   print('C')

elif b =='T':
   print('G')

Submission status: Wrong Answer

Solution code:
a = str(input())
b = "A"
c = "C"
d = "G"
e = "T"

if a == e:
  print("G")
if a == d:
  print("T")
if a == b:
  print("C")
if a == c:
  print("A")

Submission status: Wrong Answer

Solution code:
PAIR_DICT = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'T'}
print(PAIR_DICT[input()])

Submission status: Wrong Answer

Solution code:
b = input()

if b=='A':
  print ("T")
if b=='c':
  print ("G")
if b=='G':
  print ("C")
if b=='T':
  print ("A")