TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
moji = input()
if moji == "A" :
    print("A")
if moji == "C" :
    print("T")
if moji == "G" :
    print("C")
if moji == "T" :
    print("G")

moji = input()
if moji == "A" :
    print("T")
if moji == "C" :
    print("G")
if moji == "G" :
    print("C")
if moji == "T" :
    print("A")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
letter = input()

dict = {'A': 'A', 'C':'T', 'G':'C', 'T':'G'}
if letter in dict:
  print(dict[letter])

letter = input()
dict = {'A': 'A', 'C':'T', 'G':'C', 'T':'G'}
for letter in dict:
  print(dict[letter])

letter = input()

dict = {'A': 'T', 'C':'G', 'T':'A', 'G':'C'}
if letter in dict:
  print(dict[letter])

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b=input()
if b='A':c='T'
if b='T':c='A'
if b='C':c='G'
if b='G':c='C'
print(c)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input()
if b='A':
  print('T')
elif b='T':
  print('A')
elif b='G':
  print('C')
else:
  print('G')

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b = "A":
    print("T")
elif b = "T":
    print("A")
elif b = "C":
    print("G")
elif b = "G":
    print("C")

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input
if b=='A':
    print('T')
elif b=='T':
    print('A')
elif b=='C':
    print('G')
elif b=='G':
    print('C')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
for i in range(len(b)):
  if b[i] == 'A':
    b[i] = 'T'
  elif b[i] == 'T':
    b[i] = 'A'
  elif b[i] == 'G':
    b[i] = 'C'
  else:
    b[i] = 'G'
print(b)

# b = input()
# if b == 'A':
#     print('T')
# elif b == 'T':
#     print('A')
# elif b == 'G':
#     print('C')
# else:
#     print('G')
b = input()
c = []
for i in range(len(b)):
  if b[i] == 'A':
    c.append('T')
  elif b[i] == 'T':
    c.append('A')
  elif b[i] == 'G':
    c.append('C')
  else:
    c.append('G')
print(''.join(c))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def resolve():
    s=input()
    num=0
    for i in range(len(s)):
        for j in range(len(s)+1):
            s1=s[i:j]
            if 'B' not in s1 and 'D' not in s1 and 'E' not in s1 and 'F' not in s1\
                    and 'H' not in s1 and 'I' not in s1 and 'J' not in s1 and 'K' not in s1 and 'L' not in s1 and\
                    'M' not in s1 and 'N' not in s1 and 'O' not in s1 and 'P' not in s1 and 'Q' not in s1 and\
                    'R' not in s1 and 'S' not in s1 and 'U' not in s1 and 'X' not in s1 and 'Y' not in s1 and\
                    'Z' not in s1 and len(s1)>=num:
                num=len(s1)
    print(num)
resolve()

def resolve():
    s=input()
    num=0
    for i in range(len(s)):
        for j in range(len(s)+1):
            s1=s[i:j]
            if 'B' not in s1 and 'D' not in s1 and 'E' not in s1 and 'F' not in s1\
                    and 'H' not in s1 and 'I' not in s1 and 'J' not in s1 and 'K' not in s1 and 'L' not in s1 and\
                    'M' not in s1 and 'N' not in s1 and 'O' not in s1 and 'P' not in s1 and 'Q' not in s1 and\
                    'R' not in s1 and 'S' not in s1 and 'U' not in s1 and 'X' not in s1 and 'Y' not in s1 and\
                    'Z' not in s1 and len(s1)>num:
                num=len(s1)
    print(num)
resolve()

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
if s=="C":
  print("G")
elif s=="G":
  print("C")
elif s=="A":
  print("T"):
else:
  print("A")

s=input()

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
print("ACGT"["CATG".find(input())])

print(["ACGT"]["CATG".find(input())])

print("ACGT"["TGCA".find(input())])

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == A:
  print(T)
elif b == T:
  print(A)
elif b == C:
  print(G)
else:
  print(C)

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = map(int, input().split())

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

b, = map(str, input().split())

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
i = ['A','C','G','T']
o = ['C','A','T','G']
print(o[i.index(b)])

b = input()
i = ['A','C','G','T']
o = ['T','G','C','A']
print(o[i.index(b)])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N, Q = map(int, input().split())
S = input()
l = [0] * Q
r = [0] * Q
for i in range(Q):
    l[i], r[i] = map(int, input().split())
counter = [0] * N

for i in range(N-1):
    if S[i:i+2] == 'AC':
        counter[i+1] += counter[i] + 1
    else:
        counter[i+1] += counter[i]

for i in range(Q):
    print(counter[r[i]-1] - counter[l[i]-1])

def main():
    b = input()
    if(b=='A'):
        return print('T')
    if(b=='T'):
        return print('A')
    if(b=='C'):
        return print('G')
    if(b=='G'):
        return print('C')
main()

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == 'A' or b == 'G':
  if b == 'A':
    print('G')
  else:
    print('A')
else:
  if b == 'C':
    print('G')
  else:
    print('C')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == 'A':
    print('C')
elif b == 'C':
    print('A')
elif b == 'G':
    print('T')
elif b == 'T':
    print('G')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
input=sys.stdin.readline

def main():
    b = input().strip()
    if b == "A":
        print("C")
    elif b == "C":
        print("A")
    elif b == "G":
        print("T")
    else:
        print("G")

if __name__ == '__main__':
    main()


import sys
input=sys.stdin.readline

def main():
    b = input().strip()
    if b == "A":
        print("T")
    elif b == "T":
        print("A")
    elif b == "G":
        print("C")
    else:
        print("G")

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
l = ['A', 'C', 'T', 'G']
b = input()
for i in range(3):
    if l[i] == b:
        print(l[(i+2)/4])
        break

n,q=map(int,input().split())
s=input()

for _ in range(q):
	l,r=map(int,input().split())
	# list_=[s[l-1:r]]
	# print(s[l-1:r])
	ans=0
	for i in range(l-1,r-1):
		if s[i] == 'A' and s[i+1] == 'C':
			ans +=1



	print(ans)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b=='A': print("T")
elif b=='C': print("G")
else print(b)


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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# ABC122A - Double Helix
# a-t, c-g
data = {'a': 't', 't': 'a', 'c': 'g', 'g': 'c'}

print(data[input()])

# ABC122A - Double Helix
# a-t, c-g
data = {"A": "T", "T": "A", "C": "G", "G": "C"}

print(data[input()])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
dic = { "A": "G",
        "G": "A", 
        "T": "C",
        "C": "T" }
print(dic[input()])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a={"A":"T","T":"A","C":"G","G":"C"}
print(b[input()])

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

s = input()
dic_ = {'T':'A','A':'T','G':'C','C':'G'}
print(dic_[s])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
dict = {'A':'T','C':'G','T':'A', 'G':'C'}
a = input()
print(dict(a))

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def main():
  b=int(input())

  if b=="A":
    return "T"
  elif b=="C":
    return "G"
  elif b="G":
    return "C"
  elif b=="T":
    return "A"

main()


def main():
  b=input()

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

main()


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input()

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

b=input()

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()

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

b = input()

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n, q = input().split()
Q = int(q)
s = input()
S = list(s)

array = []
count = 0
ff = False
for i in range(len(S)):
    if len(S) < i+1:
        break
    if S[i] == 'A':
        flag = True
    elif flag == True and S[i] == 'C':
        count += 1
        array.append(-1)
        array.append(count)
        ff = True
    elif flag == True:
        array.append(0)
        array.append(0)
        flag = False
    else:
        array.append(0)

array_q = []
for q in range(Q):
    l, r = input().split()
    array_q.append([int(l), int(r)])

for arr in array_q:
    try:
        if ff != True:
            print(0)
            continue

        if len(array[arr[0]-1:arr[1]-1]) < 2:
            print(0)
            continue

        for a in array[arr[0]-1:]:
            if a == -1:
                flag = True
            elif flag == True:
                minv = a
                break

        for b in reversed(array[:arr[1]]):
            if b != 0 and b != -1:
                maxv = b
                break

        if minv == maxv and maxv != 0:
            print(1)
            
        elif maxv == 0:
            print(0)

        else:
            print(maxv - minv + 1)
            maxv = 0
            minv = 0
    except:
        print(0)

h = input()

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
print('T' if s=='A' else 'G' of s=='C' else 'A' if s=='T' else 'C')

s=input()
print('T' if s=='A' else 'G' if s=='C' else 'A' if s=='T' else 'C')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input()
if b =="A"
  print("T")
elif b =="T"
  print("A")
elif b =="G"
  print("C")
elif b =="C"
  print("G")

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input()
if b=='A':
    print('T')
elif b=='T':
    prtnt('A')
elif b=='C':
    print('G')
elif b=='G'
    print('C')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
dict = {'A':'T','T':'A','G':'C','C':'G'}
print(dict(s))

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
acgt = ['A', 'C', 'G', 'T']
max_length = 0

length = 0
for target in s:
	if target in acgt:
		length += 1
		if max_length < length:
			max_length = length
	else:
		length = 0

print(max_length)

b = input()

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- 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)

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

@author: Owner
"""
a = []
b = str(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[0])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b=int(input())

e_dict={
  'A':'T',
  'T':'A',
  'G':'C',
  'C':'G'
}

print(e_dict[b])
 

b=input()

e_dict={
  'A':'T',
  'T':'A',
  'G':'C',
  'C':'G'
}

print(e_dict[b])
 


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b=input()
if b=='A':
	print('T')
if b=='T':
	print('A')
if b=='C':
	print('G'):
if b=='G':
	print('C')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
 n = input()
  
if n == 'A':
  print('T')
elif n == 'T':
  print('A')
elif n == 'G':
  print('C')
else:
  print('G')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
 
if  "A"==b
    print("T")
elif "C"==b
    print("G")
elif "T"==b
    print("A")
else:
    print("C")

b = input()

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s == 'A':
    print 'T'
elif s=='T':
    print 'A'
elif s=='G':
    print 'C'
elif s=='C':
    print 'G'

s = str(input())
if s == 'A':
    print('T')
elif s=='T':
    print('A')
elif s=='G':
    print('C')
elif s=='C':
    print('G') 

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, Q = list(map(int, input().split()))
S = input()
l = [0] * Q
r = [0] * Q
for x in range(Q):
    l[x], r[x] = list(map(int, input().split()))

isAC = [0] * len(S)
for x in range(len(S) - 1):
    if S[x] == "A" and S[x + 1] == "C":
        isAC[x] = 1

for x in range(Q):
    ans = 0
    cut_isAC = isAC[l[x] - 1:r[x] - 1]
    for y in range(len(cut_isAC)):
        ans += cut_isAC[y]
    print(ans)


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("G")
elif b=="G":
    print("C")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- 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])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
e = 'ACGT'
print(e[e.index(b)])

b = input()
e = 'ACGT'
print(e[3-e.index(b)])


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,Q=map(int,input().split())
S=input()
l=list(S)
n=[0]*(N-1)
for i in range(N-1):
    if l[i]=='A':
        if l[i+1]=='C':
            n[i]=1
for i in range(Q):
    l,r=map(int,input().split())
    print(sum(n[l-1:r-1]))

N,Q=map(int,input().split())
S=input()
out=''
for i in range(Q):
    l,r=map(int,input().split())
    out+=str(S[l-1:r].count('AC'))+'\n'
print(out[:-1])

b=['A','T','A','C','G','C']
print(b[b.index(input())+1])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()

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

b = str(input())

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
if s=="A":
    print("T")
if s=="T":
    print("A")
if s=="C":
    print("G")
else:
    print("C")

s=input()
if s=="A":
    print("T")
if s=="T":
    print("A")
if s=="C":
    print("G")
if s=="G":
    print("C")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int, ss_raw()))

N = int_raw()
memo = [{} for x in range(N+1)]

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

def chk(last4):
    for i in range(len(last4)):
        l = list(last4)
        if i > 0:
            l[i],l[i-1] = l[i-1],l[i]
        if "AGC" in "".join(l):
            return False
    return True

def rec(idx, last3):
    if idx == N:
        return 1
    elif last3 in memo[idx]:
        return memo[idx][last3]
    else:
        ret =0
        for d in dna:
            if chk(last3 + d):
                ret+= rec(idx+1,last3[1:]+d)
                ret = ret % (10**9+7)
        memo[idx][last3] = ret
        return ret


def ans():
    return rec(0,"TTT")

print(ans())


def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int, ss_raw()))

b = input()

dna = {"A":"T","C":"G","G":"C","T":"A"}

def ans():
    return dna[b]

print(ans())


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = 'ACGT'
b = 'ATCG'
x = input()
for i in range(0, 4):
  if x[0] == a[i]:
    print(b[i])

a = 'ATCG'
b = 'TAGC'
x = input()
for i in range(0, 4):
  if x[0] == a[i]:
    print(b[i])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s == "A":
    print("T")
elif: s == "T":
    print("A")
elif s == "C":
    print("G")
else:
    print("C")


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
dic={A:'T',T:'A',C:'G',G:'C'}
print(dic[s])

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
print("T" if a == "A" else "A" if a == "T" else "G" if a == "C" else "C")

a = input()
print("T" if a == "A" else "A" if a == "T" else "G" if a == "C" else "C")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, Q = map(int, input().split())
S = input()
LR = [list(map(int, input().split())) for _ in range(Q)]

t = [0] * (N+1)
for i in range(N):
    t[i+1] = t[i] + (1 if S[i: i+2] == 'AC' else 0)
ans = [t[LR[i][1] - 1] - t[LR[i][0] - 1] for i in range(Q)]    

print(*ans, sep='\n')

b = input()

dic = {'A':'T', 'T':'A', 'C':'G', 'G':'C' }

print(dic[b])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l1 = ['A','T']
l2 = ['C','G']
b = str(input())
print(b)
ans = ''
if b in l1:
    l1.remove(b)
    ans = l1[0]
if b in l2:
    l2.remove(b)
    ans = l2[0]
print(ans)

l1 = ['A','T']
l2 = ['C','G']
b = str(input())
print(b)
ans = ''
if b in l1:
    l1.remove(b)
    ans = t1[0]
if b in l2:
    l2.remove(b)
    ans = l2[0]
print(ans)

l1 = ['A','T']
l2 = ['C','G']
b = str(input())
ans = ''
if b in l1:
    l1.remove(b)
    ans = l1[0]
if b in l2:
    l2.remove(b)
    ans = l2[0]
print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == A:
  print("T")
elif b == C:
  print("G")
elif b == G:
  print("C")
else b == T:
  print("A")

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


b = input()

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x=input()
if x=="A":
  print("T")
if x=="T":
  print("A")
if x=="G":
  print("C")
else:
  print("G")


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

x=input()
if x=="A":
  print("T")
if x=="T":
  print("A")
if x=="G":
  print("C")
if x=="C":
  print("G")


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
base = ['A','T','C','G']

ind = base.index(input())
if(ind%2 == 0):
  printf(base[ind+1])
else:
  printf(base[ind-1])

base = ['A','T','C','G']
 
ind = base.index(input())
if(ind%2 == 0):
  print(base[ind+1])
else:
  print(base[ind-1])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == T:
  print("A")
elif b == A:
  print("T")
elif b == G:
  print("C")
else:
  print("G")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

li = ["A","T","G","C"]
max = 0
ct = 0
s = input()
for ch in s:
    if ch in li:
        ct += 1
        if max < ct:
            max = ct
    else:
        ct = 0
print(max)

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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'))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

b = input()

print(b)

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



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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
b = input()
if b == A:
  print("T")
elif b == C:
  print("G")
elif b == G:
  print("C")
else:
  print("A")

b = input()

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import re

N, S = map(int, input().split(' '))
pattern = "AC+"
T = input()
for _ in range(S):
    first,final = map(int, input().split(' '))
    print(first, final)
    result = re.findall(pattern, T[first -1:final])
    print(result)
    print(len(result))

import re

N, S = map(int, input().split(' '))
pattern = "AC+"
T = input()
for _ in range(S):
    fir,fin = map(int, input().split(' '))
    result = re.findall(pattern, T[fir -1:fin])
    print(len(result))

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = str( input() )
elist = [ "A", "C", "G", "T" ]
print( elist[ 2 - elist.index( b ) ] )

b = str( input() )
elist = [ "A", "C", "G", "T" ]
print( elist[ 3 - elist.index( b ) ] )

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def get_answer(s):
    count = 0
    for i, c in enumerate(s):
        if i == len(s) - 1:
            return count
        if c == "A" and s[i + 1] == "C":
            count += 1

    return count

n, q = map(int, input().split())
s = str(input())
questions = []
for i in range(q):
    a, b = map(int, input().split())
    questions.append((a - 1, b - 1))

for question in questions:
    print(get_answer(s[question[0]: question[1] + 1]))


def get_answer(s):
    count = 0
    for i, c in enumerate(s):
        if i == len(s) - 1:
            return count
        if c == "A" and s[i + 1] == "C":
            count += 1

    return count

n, q = map(int, input().split())
s = str(input())
questions = []
for _ in range(q):
    a, b = map(int, input().split())
    questions.append((a - 1, b - 1))

for question in questions:
    print(get_answer(s[question[0]: question[1] + 1]))


map = {
    "A":"T",
    "T":"A",
    "C":"G",
    "G":"C"
}

a = str(input())
print(map[a])


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()

a = ['A', 'C', 'G', 'T']
for i in range(len(a)):
  if a[i] == b:
    print(a[i])
    break


b = input()

a = ['A', 'C', 'G', 'T']
for i in range(len()):
  if a[i] == b:
    print(a[i])
    break

b = input()

a = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}

print(a[b])

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
N,Q = map(int,sys.stdin.readline().rstrip().split())
S = sys.stdin.readline().rstrip()
for _ in range(Q):
  l,r  = map(int,sys.stdin.readline().rstrip().split())
  print(S[l-1:r].count("AC"))
  del l
  del r

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
dic = {}
dic['A'] = T
dic['T'] = A
dic['C'] = G
dic['G'] = C

def a(b):
	return dic[b]

a=input('请输入字母：')
print(a(a))

dic = {}
dic['A'] = 'T'
dic['T'] = 'A'
dic['C'] = 'G'
dic['G'] = 'C'

def a(b):
	return dic[b]

a=input()
print(a(a))


dic = {}
dic['A'] = 'T'
dic['T'] = 'A'
dic['C'] = 'G'
dic['G'] = 'C'

def a(b):
	return dic[b]

a=input()
print(a(a))

dic = {}
dic['A'] = T
dic['T'] = A
dic['C'] = G
dic['G'] = C

def a(b):
	return dic[b]

a=input()
print(a(a))

dic = {}
dic['A'] = 'T'
dic['T'] = 'A'
dic['C'] = 'G'
dic['G'] = 'C'

def C(b):
    return dic[b]

a=input()
print(C(a))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
b = input()

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

b = input()

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


Verdicts: Runtime Error

Accepted