Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def memoize(f):
    table = {}

    def func(*args):
        if not args in table:
            table[args] = f(*args)
        return table[args]
    return func


@memoize
def memo(a, b):
    if a == b:
        return e[a].count(a)
    elif b - a == 1:
        return memo(b, b) + memo(a, a) + e[a].count(b)
    else:
        return memo(a+1, b)+memo(a, b-1) + e[a].count(b) - memo(a+1, b-1)


n, m, q = map(int, input().split())
e = []
for i in range(n+1):
    e.append([])
for i in range(m):
    x, y = map(int, input().split())
    e[x].append(y)
for i in range(q):
    x, y = map(int, input().split())
    print(memo(x, y))

Fixed submission:
import sys
sys.setrecursionlimit(500000)

def memoize(f):
    table = {}

    def func(*args):
        if not args in table:
            table[args] = f(*args)
        return table[args]
    return func


@memoize
def memo(a, b):
    if a == b:
        return e[a].count(a)
    elif b - a == 1:
        return memo(b, b) + memo(a, a) + e[a].count(b)
    else:
        return memo(a+1, b)+memo(a, b-1) + e[a].count(b) - memo(a+1, b-1)


n, m, q = map(int, input().split())
e = []
for i in range(n+1):
    e.append([])
for i in range(m):
    x, y = map(int, input().split())
    e[x].append(y)
for i in range(q):
    x, y = map(int, input().split())
    print(memo(x, y))
Buggy python submission (verdict: Runtime Error):
a=input()
if a<=999:
    print("ABC")
else:
    print("ABD")

Fixed submission:
a=int(input())
if a<=999:
    print("ABC")
else:
    print("ABD")
Buggy python submission (verdict: Time Limit Exceeded):
lis=[]
n=int(input())
saidai = n + 1
lis += input()
for rida in range(n):
    count=0
    for i in range(n):
        if i < rida and lis[i] == "W":
            count += 1
        elif i > rida and lis[i] == "E":
            count += 1
    if count < saidai:
        saidai = count
print(saidai)

Fixed submission:
lis=[]
n=int(input())
lis += input()
count=0
for i in range(1,n):
    if lis[i]=="E":
        count += 1
saidai = count
for i in range(n-1):
    if lis[i] == "W":
        count += 1
    if lis[i+1] == "E":
        count -= 1
        if saidai > count:
            saidai = count
print(saidai)
Buggy python submission (verdict: Runtime Error):
lis=[1,2,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,216,36,343,49,100,1000]
for i in range(11,32):
    t=i*i
    lis.append(t)
listt=list(set(lis))
listt=sorted(listt)
a=int(input())
for i in range(300):
    if a < listt[i]:
        print (listt[i-1])
        break
    elif a = listt[i]:
        print(listt[i])
        break

Fixed submission:
lis=[1,2,4,8,16,32,64,128,256,512,9,27,81,243,729,25,125,625,216,36,343,49,100,1000]
for i in range(11,32):
    t=i*i
    lis.append(t)
listt=list(set(lis))
listt=sorted(listt)
a=int(input())
for i in range(300):
    if a < listt[i]:
        print (listt[i-1])
        break
    elif a == listt[i]:
        print(listt[i])
        break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0]
a += list(map(int, input().split()))
a.append(0)
aa = []
for i in range(n+1):
    aa.append(abs(a[i] - a[i + 1]))
for i in range(n):
    print(sum(aa)-aa[i]-aa[i+1]+abs(a[i]-a[i+2]))

Fixed submission:
n = int(input())
a = [0]
a += list(map(int, input().split()))
a.append(0)
ans = 0
for i in range(1, n + 1):
    ans += abs(a[i] - a[i + 1])
for i in range(n):
    ans -= abs(a[i+1]-a[i+2])
    print(ans+abs(a[i] - a[i + 2]))
    ans += abs(a[i] - a[i + 1])

Buggy python submission (verdict: Time Limit Exceeded):
n=input()
are=list(map(int,input().split()))
for i in range(len(are)):
    kotae=0
    sin=[0]
    for j in range(len(are)):
        if j != i:
            sin.append(are[j])
    sin.append(0)
    for k in range(len(sin)-1):
        kotae += abs(sin[k+1]-sin[k])
    print(kotae)


Fixed submission:
n = int(input())
a = [0]
a += list(map(int, input().split()))
a.append(0)
ans = 0
for i in range(1, n + 1):
    ans += abs(a[i] - a[i + 1])
for i in range(n):
    ans -= abs(a[i+1]-a[i+2])
    print(ans+abs(a[i] - a[i + 2]))
    ans += abs(a[i] - a[i + 1])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
b = []
look = 1
end = 0
count = 0
for i in range(n):
    a.append(int(input()))
while end == 0:
    count += 1
    b.append(look)
    look = a[look - 1]
    for i in range(len(b)):
        if b[i] == look:
            end = -1
            break
    else:
        if look == 2:
            end = count
print(end)

Fixed submission:
n = int(input())
a = []
b = [0]*n
look = 1
end = 0
count = 0
for i in range(n):
    a.append(int(input()))
while end == 0:
    count += 1
    b[look-1] = 1
    look = a[look - 1]
    if b[look - 1] == 1:
        end = -1
    else:
        if look == 2:
            end = count
print(end)
Buggy python submission (verdict: Time Limit Exceeded):
n, x = map(int, input().split())
a = list(map(int, input().split()))
a += a
ans = float("inf")
for i in range(1, n+1):
    t = 0
    for j in range(n):
        t += min(a[j:j + i])
    ans = min(ans, t+10*(i-1))
print(ans)

Fixed submission:
n, x = map(int, input().split())
a = list(map(int, input().split()))
a += a
mah = [10000000000]*n
ans = float("inf")
for i in range(1, n+1):
    t = 0
    for j in range(n):
        if mah[j] > a[j + i]:
            mah[j] = a[j+i]
        t += mah[j]
    ans = min(ans, t+x*(i-1))
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
h = list(map(int, input().split()))
cost_list = [math.inf for _ in range(N)]
cost_list[0]  = 0

for i in range(1, N):
    if cost_list[i] > (cost_list[i-1] + abs(h[i] - h[i-1])):
        cost_list[i] = cost_list[i-1] + abs(h[i]-h[i-1])

    if i > 1:
        if cost_list[i] > (cost_list[i-2] + abs(h[i] - h[i-2])):
            cost_list[i] = cost_list[i-2] + abs(h[i]-h[i-2])

print(cost_list[N-1])


Fixed submission:
N = int(input())
h = list(map(int, input().split()))
cost_list = [float('inf') for _ in range(N)]
cost_list[0]  = 0

for i in range(1, N):
    if cost_list[i] > (cost_list[i-1] + abs(h[i] - h[i-1])):
        cost_list[i] = cost_list[i-1] + abs(h[i]-h[i-1])

    if i > 1:
        if cost_list[i] > (cost_list[i-2] + abs(h[i] - h[i-2])):
            cost_list[i] = cost_list[i-2] + abs(h[i]-h[i-2])

print(cost_list[N-1])

Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
h = map(int, input().split())
cost_list = [math.inf for _ in range(N)]
cost_list[0]  = 0 

for i in range(1, N):
  if cost_list[i] > (cost_list[i-1] + math.abs(h[i] - h[i-1])):
    cost_list[i] = cost_list[i-1] + math.abs(h[i]-h[i-1])
   
  if i > 1:
    if cost_list[i] > (cost_list[i-2] + math.abs(h[i] - h[i-2])):
      cost_list[i] = cost_list[i-2] + math.abs(h[i]-h[i-2])

print(cost[N-1])

Fixed submission:
N = int(input())
h = list(map(int, input().split()))
cost_list = [float('inf') for _ in range(N)]
cost_list[0]  = 0

for i in range(1, N):
    if cost_list[i] > (cost_list[i-1] + abs(h[i] - h[i-1])):
        cost_list[i] = cost_list[i-1] + abs(h[i]-h[i-1])

    if i > 1:
        if cost_list[i] > (cost_list[i-2] + abs(h[i] - h[i-2])):
            cost_list[i] = cost_list[i-2] + abs(h[i]-h[i-2])

print(cost_list[N-1])
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=[int(i)for i in input().split()]
c=0
if a[0]>x:
  c=a[0]-x
  a[0]=x
  for i in range(1,len(a)):
    if a[i]+a[i+1]>x:
      c+=a[i]+a[i+1]-x
      a[i+1]=x-a[i]
print(c)

Fixed submission:
n,x=map(int,input().split())
a=[int(i)for i in input().split()]
c=0
if a[0]>x:
  c=a[0]-x
  a[0]=x
for i in range(n-1):
  if a[i]+a[i+1]>x:
    c+=a[i]+a[i+1]-x
    a[i+1]=x-a[i]
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
n,ad=map(int,input().split())
b=[int(i)for i in input().split()]
def combs(a):
    if len(a) == 0:
        return [[]]
    cs =[]
    for c in combs(a[1:]):
        cs += [c, c+[a[0]]]
    return cs
cou=0
for i in combs(b):
  if len(i)==0:
    continue
  elif sum(i)/len(i)==ad:
    cou+=1
print(cou)   

Fixed submission:
n,a=map(int,input().split())
nums=[int(i)-a for i in input().split()]
d={0:1}
for i in nums:
  s = [[j, d[j]] for j in d]
  for j in s:
    if j[0] + i in d:
      d[j[0]+i] += j[1]
    else:
      d[j[0]+i] = j[1]
print(d[0]-1)
Buggy python submission (verdict: Runtime Error):
print(sum([int(i)for i in range(1,int(input()+1))]))

Fixed submission:
print(sum([int(i)for i in range(1,int(input())+1)]))
Buggy python submission (verdict: Runtime Error):
a=input()
b=a.index
while "B" in a:
  if a.startswith("B"):
    a=a[1::]
  elif "B" in a:
    a=a[0:b("B")-1]+a[b("B")+1:]
print(a)

Fixed submission:
a=input()
s=""
for i in a:
  if i=="B":
    s=s[:-1]
  else:
    s+=i
print(s)
Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
mean = (a + b) / 2.0
print(int(math.ceil(mean))


Fixed submission:
import math
a, b = map(int, input().split())
mean = (a + b) / 2.0
print(math.ceil(mean))

Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
print(int(math.ceil(mean))

Fixed submission:
import math
a, b = map(int, input().split())
mean = (a + b) / 2.0
print(math.ceil(mean))

Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
mean = (a + b) / 2
print(int(math.ceil(mean))

Fixed submission:
import math
a, b = map(int, input().split())
mean = (a + b) / 2.0
print(math.ceil(mean))
Buggy python submission (verdict: Runtime Error):
s = input()
for x in s:
  if x != '0':
    count = count + 1
print(count)

Fixed submission:
s = input()
count = 0
for x in s:
  if x != '0':
    count = count + 1
print(count)

Buggy python submission (verdict: Runtime Error):
s = input()
for x in s:
  if x != '0':
    count = count + 1


Fixed submission:
s = input()
count = 0
for x in s:
  if x != '0':
    count = count + 1
print(count)

Buggy python submission (verdict: Runtime Error):
s = input()
count = 0
for x in len(s):
  if x != '0':
    count = count + 1
print(count)

Fixed submission:
s = input()
count = 0
for x in s:
  if x != '0':
    count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
     print("NA")

Fixed submission:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")

Buggy python submission (verdict: Runtime Error):
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Fixed submission:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")

Buggy python submission (verdict: Runtime Error):
a = str(input())
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Fixed submission:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = str(a)
over = int(b[:2])
under = int(b[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Fixed submission:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = str(a)
over = int(b[:2])
under = int(b[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
else if 0<over<13 and (1>under or under>12):
   print("YYMM")
else if(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Fixed submission:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")
Buggy python submission (verdict: Runtime Error):
A,B,T = map(int,input().split())
a =T//A
number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T = map(int,input().split())
a =T//A
number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T=map(int,input().split())
a =T//A
 number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T=(int,input().split())
a =T//A
 number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T=(int,input().split())
a =T//A
number=0
for i in range(a):
 b=1
 s = a-b
 if s >0:
   number+=1
 b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T=(int,input().split())
int a =T//A
number=0
for i in range(a):
 b=1
 s = a-b
 if s >0:
   number+=1
 b+=1
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)

Buggy python submission (verdict: Runtime Error):
A,B,T=(int,input().split())
int a =T//A
for i in range(a):
 int b=1
 int s = a-b
 if sum >0:
   number++
 b++
print(number*B)

  

Fixed submission:
A,B,T = map(int,input().split())
a =T//A
number = 0
for i in range(a):
  b=1
  s = a-b
  if s >=0:
    number+=1
  b+=1
print(number*B)
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int,input().split())
c = list(map(int,input().split())
sum = 0
for i in range(n):
     if v[i] >c[i]:
      sum += v[i]-c[i]
print(sum)


Fixed submission:
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
sum = 0
for i in range(n):
     if v[i] >c[i]:
      sum += v[i]-c[i]
print(sum)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
sum =0
for i in range(2)
  if A >= B:
     sum+=A
     A-=1
  else:
     sum+=B
     B-=1
print(sum)

Fixed submission:
A,B=map(int,input().split())
sum =0
for i in range(2):
  if A >= B:
     sum+=A
     A-=1
  else:
     sum+=B
     B-=1
print(sum)

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
sum =0
for i in range(2)
  if A >= B:
     sum+=A
      A-=1
  else:
      sum+=B
      B-=1
print(sum)

Fixed submission:
A,B=map(int,input().split())
sum =0
for i in range(2):
  if A >= B:
     sum+=A
     A-=1
  else:
     sum+=B
     B-=1
print(sum)

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
sum =0
for i in range(2)
  if A >= B:
     sum+=A
      A-=1
   else:
      sum+=B
      B-=1
print(sum)

Fixed submission:
A,B=map(int,input().split())
sum =0
for i in range(2):
  if A >= B:
     sum+=A
     A-=1
  else:
     sum+=B
     B-=1
print(sum)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n+1):
  for s in range(i-1,-1,-1):
    if h[i]>=h[s]:
      count+=1
  if count==i:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n+1):
  for s in range(i-1,-1,-1):
    if h[i]>=h[s]:
      count+=1
  if count==i:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 0
for i in range(1,n):
  　for s in range(i-1,0):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count=0
sum=1
for(int i=1;i>=n;i++):
    for(int s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count=0
sum=1
for(i=1;i>=n;i++):
    for(s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count=0
sum=0
for i in range(n):
    for(s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count=0
sum=0
for i in range(n):
    for(s=i-1;s>=0;s--):
     if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)
Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in a:
  　　　　if i in 'ATGC':
    　　　　　　　num+=1
  　　　　else:
    　　　　　　　b.append(num)
    　　　　　　　num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in a:
  if a in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in a:
  if a[i] in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in range(len(a)):
  if a[i] in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in range(len(a)):
  if a[i] in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))

Buggy python submission (verdict: Runtime Error):
a = input()
num=0
b=[]
for i in range(len(a)):
  if a[i]　in "ATGC":
    num=1
  else:
    b.appendS(num)
    num=0
print(max(b))
    

Fixed submission:
a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().sprit())
print((a*b+1)//2)

Fixed submission:
a,b = map(int,input().split())
print((a+b+1)//2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

L = [0]*5
L[0] = N
count = 0
while sum(L) != 0:
    if L[4] != 0:
        tmp0 = min(L[4],E)
        L[4] -= tmp0
    if L[3] != 0:
        tmp0 = min(L[3],D)
        L[3] -= tmp0
        L[4] += tmp0
    if L[2] != 0:
        tmp0 = min(L[2],C)
        L[2] -= tmp0
        L[3] += tmp0
    if L[1] != 0:
        tmp0 = min(L[1],B)
        L[1] -= tmp0
        L[2] += tmp0
    if L[0] != 0:
        tmp0 = min(L[0],A)
        L[0] -= tmp0
        L[1] += tmp0
    count += 1
print(count)

Fixed submission:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
# N=5
# A=3
# B=2
# C=4
# D=3
# E=5
# L = [0]*5
# L[0] = N
# count = 0
# while sum(L) != 0:
#     if L[4] != 0:
#         tmp0 = min(L[4],E)
#         L[4] -= tmp0
#     if L[3] != 0:
#         tmp0 = min(L[3],D)
#         L[3] -= tmp0
#         L[4] += tmp0
#     if L[2] != 0:
#         tmp0 = min(L[2],C)
#         L[2] -= tmp0
#         L[3] += tmp0
#     if L[1] != 0:
#         tmp0 = min(L[1],B)
#         L[1] -= tmp0
#         L[2] += tmp0
#     if L[0] != 0:
#         tmp0 = min(L[0],A)
#         L[0] -= tmp0
#         L[1] += tmp0
#     count += 1
print((N-1) // min(A,B,C,D,E) + 5)