Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
  T = pop(S[A])
  if T.isdigit() is True:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Fixed submission:
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
    S = S[:A]+S[A+1:A+B+1]
    if S.isdigit() is True:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
  T = del S[A]
  if T.isdigit() is True:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Fixed submission:
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
    S = S[:A]+S[A+1:A+B+1]
    if S.isdigit() is True:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A, B, C, D =map(int,input().split())
if (A+B) > (C+D):
  print(Left)
elif (A+B) == (C+D):
  print(Balanced)
else:
  print(Right)

Fixed submission:
# -*- coding: utf-8 -*-
A, B, C, D =map(int,input().split())
if (A+B) > (C+D):
  print("Left")
elif (A+B) == (C+D):
  print("Balanced")
else:
  print("Right")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,c-map(str,input())
S = abc
print(S.count("1"))

Fixed submission:
# -*- coding: utf-8 -*-
a,b,c=map(str,input())
S = a+b+c
print(S.count("1"))
Buggy python submission (verdict: Runtime Error):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
n = int(input())
a = map(int,input().split())
ans = min(map(how_many_times_divisible, a))
print ans

Fixed submission:
N = int(input())
A = list(map(int,input().split()))

P = []

for i in A:
    ans = 0
    while int(i) == i:
        i = i/2
        ans += 1
    P.append(ans)

print(min(P)-1)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
array = [map(int,input().split())]
n = 0
for i in range(N+1):
  if array[i] % 2 == 0:
    continue    
  else:
    break
n = n+1
continue
print(n)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))

P = []

for i in A:
    ans = 0
    while int(i) == i:
        i = i/2
        ans += 1
    P.append(ans)

print(min(P)-1)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*N)

Fixed submission:
# -*- coding: utf-8 -*-
N,A,B = map(int,input().split())
if A * N >= B:
  print(B)
else:
  print("{}".format(A*N))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*N)

Fixed submission:
# -*- coding: utf-8 -*-
N,A,B = map(int,input().split())
if A * N >= B:
  print(B)
else:
  print("{}".format(A*N))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*T)

Fixed submission:
# -*- coding: utf-8 -*-
N,A,B = map(int,input().split())
if A * N >= B:
  print(B)
else:
  print("{}".format(A*N))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(N):
  S = int(N[i])
  a.append(S)
T = sum(a)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(len(N)):
  S = int(N[i])
  a.append(S)
T = sum(a)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(N):
  S = int(N[i])
  a.append(S)
T = sum(S)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(len(N)):
  S = int(N[i])
  a.append(S)
T = sum(a)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
N = str(input())
  if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
    print("Yes")
  else:
    print("No")

Fixed submission:
#-*- coding: utf-8 -*-
N = str(input())
if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
N = str(input())
for i in range(1,2):
  if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]

Fixed submission:
#-*- coding: utf-8 -*-
N = str(input())
if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
X,Y = map(int,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(">")
elif P==Q:
  print("=")
else:
  print("<")

Fixed submission:
X,Y = map(str,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(">")
elif P==Q:
  print("=")
else:
  print("<")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,Y = map(int,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(>)
elif P=Q:
  print(=)
else:
  print(<)

Fixed submission:
X,Y = map(str,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(">")
elif P==Q:
  print("=")
else:
  print("<")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
while X >= Z+Y:
  a.append(1)
else:
  break
print(sum(a))

Fixed submission:
# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
X = X-Z
while X >= Z+Y:
  a.append(1)
  X = X - (Z+Y)
print(sum(a))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] = S:
  print("YES")
else:
  print("NO")

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] == S:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
M = str(input())
if N = M.reverse():
  print(YES)
else:
  print(NO)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] == S:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C =map(int,input().split())
if A == B:
  print(C)
elif B == C:
  print(A)
else:
  print()B

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C =map(int,input().split())
if A == B:
  print(C)
elif B == C:
  print(A)
else:
  print(B)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X = int(input())
t = int(input())
if X > t:
  print(X - t)
else:
  print(0)

Fixed submission:
# -*- coding: utf-8 -*-
X , t= map(int, input().split())
if X > t:
  print(X - t)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
a.[]
for i in range(len(S)):
  if i % 2 == 1:
    a.append(S[i])
print(a.join())

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
a=[]
for i in range(len(S)):
  if i % 2 == 0:
    a.append(S[i])
print("".join(a))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = str(input())
for i in range(len(S) / 2):
  s.pop(2*i - 1)
print(s)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
a=[]
for i in range(len(S)):
  if i % 2 == 0:
    a.append(S[i])
print("".join(a))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
L = ["abcdefghijklmnopqrstuvwxyz"]
T = L-S
print(T[0])

Fixed submission:
S = input()

unko =["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

for i in unko:
    if S.count(i) == 0:
        print(i)
        exit()

print("None")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

AS = list(set(A))
D = {}
for i in A:
    if i in D.keys():
        D[i] += 1
    else:
        D[i] = 1

accum = []
AS.sort(reverse=True)
for i in AS:
    if D[i] >= 2:
       accum.append(i)


if D[accum[0]] >= 4:
    print(accum[0]**2)
elif D[accum[0]] >= 2:
    print(accum[0]*accum[1])
else:
    print(0)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))

AS = list(set(A))
D = {}
for i in A:
    if i in D.keys():
        D[i] += 1
    else:
        D[i] = 1

accum = []
AS.sort(reverse=True)
for i in AS:
    if D[i] >= 2:
       accum.append(i)

if len(accum) != 0:
   if D[accum[0]] >= 4:
    print(accum[0]**2)
   elif D[accum[0]] >= 2:
    print(accum[0]*accum[1])
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split())
L = [A:B]
M = [C:D]
print(L&M)

Fixed submission:
A,B,C,D = map(int,input().split())

sup = max(D,B)
inf = min(A,C)

if B-A + D-C <= sup - inf:
    print(0)
else:
    print(B-A+D-C - (sup - inf))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
T,U = S[0],S[-1]
print(S[0]+len(S[1:-2])+S[-1])

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T,U = S[0],S[-1]
print(S[0]+str(len(S[1:len(S)-1]))+S[-1])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [1,2,4,8,16,32,64]
while N > 1:
  if N in L:
    print(N)
  else:
    N = N - 1
print(1)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
x = 1
while N >= 2**x:
  x = x+1
  
print(2 ** x //2)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [1,2,4,8,16,32,64]
while N > 1:
  if N in L:
    print(N)
  else:
    N = N - 1
print(1)


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
x = 1
while N >= 2**x:
  x = x+1
  
print(2 ** x //2)
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
l = [map(int,input().split())]
m = sorted(l).reverse()
b = []
for i in range(K):
  b.append(m[i])
print(sum(b))

Fixed submission:
N , K = map(int,input().split())
l = list(map(int,input().split()))
asc_lst = sorted(l)
ans = []
for i in range(K):
    ans.append(asc_lst[-(i+1)])

A = sum(ans)
print(A)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
M = a.reverse()
b = []
for j in range(K):
  b.append(L(j))
print(sum(b))

Fixed submission:
N , K = map(int,input().split())
l = list(map(int,input().split()))
asc_lst = sorted(l)
ans = []
for i in range(K):
    ans.append(asc_lst[-(i+1)])

A = sum(ans)
print(A)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
L = L[::-1]
for i in range(N):
  b.append(a[i])
print(sum(b))

Fixed submission:
N , K = map(int,input().split())
l = list(map(int,input().split()))
asc_lst = sorted(l)
ans = []
for i in range(K):
    ans.append(asc_lst[-(i+1)])

A = sum(ans)
print(A)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int,input().split()))
A = sum(a)
ans = float("inf")
for i in range(1,N):
    if abs(2*sum(a[:i]) - A) < ans:
        ans = abs(2*sum(a[:i])-A)

print(ans)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
A = sum(a)
ans = float("inf")
p = 0
for i in range(N-1):
    p += a[i]
    if abs(2*p - A) < ans:
        ans = abs(2*p-A)

print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print(dangerous)
elif B - A <= X and B - A > 0:
  print(safe)
else:
  print(delicious)

Fixed submission:
# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print("dangerous")
elif B - A <= X and B - A > 0:
  print("safe")
else:
  print("delicious")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
r,g,b = int(input())
S = "r"+"g"+"b"
T = int(input(S))
if T % 4 == 0:
  print("YES")
else:
  print("NO")

Fixed submission:
# -*- coding: utf-8 -*-
r,g,b =map(str, input().split())
S = r+g+b
T = int(S)
if T % 4 == 0:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    a = list(map(int,input().split())) 
A = set(a)
B = sorted(A)
C = []
for i in range(len(A)):
    C.append(B[i+1]-B[i])
print(sum(C))

Fixed submission:
N = int(input())
a = list(map(int,input().split())) 
A = set(a)
B = sorted(A)
C = []
for i in range(len(A)-1):
    C.append(B[i+1]-B[i])
print(sum(C))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int,input().split())
L = []
M = []
for i in range(N):
  L.append(a[i])
L.sort()
for i in range(N):
  M.append(L[i+1]-L[i])
print(sum(M))

Fixed submission:
N = int(input())
a = list(map(int,input().split())) 
A = set(a)
B = sorted(A)
C = []
for i in range(len(A)-1):
    C.append(B[i+1]-B[i])
print(sum(C))
Buggy python submission (verdict: Runtime Error):
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		if (a+b >= 10){
			System.out.println("error");
	    }
	    else {
			System.out.println(a+b);
		}
	}
}

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A , B =map(int,input().split())
if A + B <10:
  print("{}".format(A+B))
else:
  print("error")

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B=map(int,input(),split())
if A + B <10:
  print("{}".format(A+B))
else:
  print("error")

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A , B =map(int,input().split())
if A + B <10:
  print("{}".format(A+B))
else:
  print("error")
Buggy python submission (verdict: Runtime Error):
# -*- coding; utf-8 -*-
H,W = map(int,input().split())
a = []
for i in range(H):
  a.append(map(str,input().split()))
print("#####")
while i < H:
  print("#"+str(a[i])+"#")
  i=i+1
print("#####")

Fixed submission:
# -*- coding: utf-8 -*-
x,y = map(int,input().split())
A = {1,3,5,7,8,10,12}
B = {4,6,9,11}
C = {2}
S = {x,y}
if (S <= A or S <= B) is True:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8

Fixed submission:
N,M = map(int,input().split())
A = [(list(map(int,input().split()))) for i in range(M)]
L = []
for i in range(M):
    L.append(A[i][0])
    L.append(A[i][1])
for i in range(1,N+1):
    print(L.count(i))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,M = map(int,input().split())
a,b = map(list,input() for i in range(M))
for i in range(N):
  print(a.count(i) + b.count(i))

Fixed submission:
N,M = map(int,input().split())
A = [(list(map(int,input().split()))) for i in range(M)]
L = []
for i in range(M):
    L.append(A[i][0])
    L.append(A[i][1])
for i in range(1,N+1):
    print(L.count(i))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s,t,u = map(str,input().split())
S = s[0]
T = t[0]
U = u[0]
print("{}".format(S+T+U.upper())

Fixed submission:
# -*- coding: utf-8 -*-
s,t,u = map(str,input().split())
S = s[0]
T = t[0]
U = u[0]
print("{}".format((S+T+U).upper()))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s,t,u=map(str,input().split)
A = s[0]
B = t[0]
C = u[0]
print("{}".format(A+B+C.upper()))

Fixed submission:
# -*- coding: utf-8 -*-
s,t,u = map(str,input().split())
S = s[0]
T = t[0]
U = u[0]
print("{}".format((S+T+U).upper()))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
S = A-B
if S > 0:
  print("GREATER")
elif S = 0:
  print("EQUAL")
else:
  print("LESS")

Fixed submission:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
S = A-B
if S > 0:
  print("GREATER")
elif S == 0:
  print("EQUAL")
else:
  print("LESS")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())
if b-a = c-b:
  print("YES")
else:
  print("NO")

Fixed submission:
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())
if b-a == c-b:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)

Fixed submission:
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)-1):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)

Fixed submission:
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)-1):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a = "H" and b = "H")or(a = "D" and b = "D"):
  print("H")
else:
  print("D")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
A = int(a)
B = int(b)
if B * A == 1:
  print("H")
else:
  print("D")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
A = int(a)
B = int(b)
if a * b == 1:
  print("H")
else:
  print("D")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
if a * b == 1:
  print("H")
else:
  print("D")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H)
D = int(D)
if H * D == 1:
  print("H")
else:
  print("D")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
def fact(n):
  if n == 0:
    return 1
  elif n == 1:
    return 1
  else:
    return fact(n-1)*n
print(fact(N) % (10**9 +7))

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
A = 1
for i in range(N):
  A = A*(i+1) % (10 ** 9 + 7)
print(A)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
S = str(input())
a = []
for i in range(N):
  b = S[0:i+1].count("I")
  c = S[0:i+1].count("D")
  M = b-c
  a.append(M)
print(max(a))

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split())
print("{}".format(max(A*B,C*D)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
lst_for_ans = []
for i in range(len(S)):
       I_count = S[:i].count("I")
       D_count = S[:i].count("D")
       lst_for_ans.append(I_count - D_count)

       print(max(lst_for_ans,0))

Fixed submission:
N = int(input())
S = str(input())
lst_for_ans = []
for i in range(len(S)+1):
       I_count = S[:i].count("I")
       D_count = S[:i].count("D")
       lst_for_ans.append(I_count - D_count)

print(max(max(lst_for_ans),0))
Buggy python submission (verdict: Runtime Error):
import java.util.*;
public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        String op = sc.next();
        int B = sc.nextInt();

        if (op.equals("+")){
            System.out.println(A+B);
        }
        else{
            System.out.println(A-B);
        }
        sc.close();
    }
}

Fixed submission:
# -*- coding: utf-8 -*-
A,op,B = map(str,input().split())
S,T=int(A),int(B)
if op == "+":
  print(S+T)
else:
  print(S-T)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
c = str(input())
if c == "a" or c == "i" or c == "u" or c == "e" or c == "o"

Fixed submission:
# -*- coding: utf-8 -*-
c = str(input())
if c == "a" or c == "i" or c == "u" or c == "e" or c == "o":
  print("vowel")
else:
  print("consonant")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b,x = map(int,input().split())
L = []
for i in range(a,b+1):
  if i % x == 0:
    L.append(1)
print(sum(L))

Fixed submission:
a,b,x = map(int,input().split())

def func(i):
    if i != -1:
        return i//x+ 1
    else:
        return 0

print(func(b) - func(a-1))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,x = map(int,input().split())
a = []
for i in range(a:b+1):
  if i % x == 0:
    a.append(1)
print(sum(a))

Fixed submission:
a,b,x = map(int,input().split())

def func(i):
    if i != -1:
        return i//x+ 1
    else:
        return 0

print(func(b) - func(a-1))
Buggy python submission (verdict: Time Limit Exceeded):
a,b = map(int,input().split())
po = []
ne = []
ze = []
for i in range(a,b+1):
    if i < 0:
        ne.append(1)
    elif i > 0:
        po.append(1)
    else:
        ze.append(1)

if sum(ze) != 0:
    print("Zero")
elif sum(ne) % 2 == 0:
    print("Positive")
else:
    print("Negative")

Fixed submission:
a,b = map(str,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("Zero")
elif P == 2:
  if (int(b) - int(a)) % 2 ==0:
    print("Negative")
  else:
    print("Positive")
else:
  print("Positive")

Buggy python submission (verdict: Runtime Error):
a,b = str(int,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("0")
elif P == 2:
  print("Negative")
else:
  print("Positive")

Fixed submission:
a,b = map(str,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("Zero")
elif P == 2:
  if (int(b) - int(a)) % 2 ==0:
    print("Negative")
  else:
    print("Positive")
else:
  print("Positive")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
S =set("ABC")
T =set("557")
if S & T = ("5","5","7"):
  print("YES")
else:
  print("NO")

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C = map(str,input().split())
S = A+B+C
if S.count("5") ==2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
S =[A,B,C]
T =[5,5,7]
if S = T:
  print("YES")
else:
  print("NO")

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C = map(str,input().split())
S = A+B+C
if S.count("5") ==2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a=input()
if a=="SSS":
  print(0)
elif a="RRR":
  print(3)
elif a="RRS" or a="SRR":
  print(2)
else:
  print(1)


Fixed submission:
a=input()
if a=="SSS":
  print(0)
elif a=="RRR":
  print(3)
elif a=="RRS" or a=="SRR":
  print(2)
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
a=input()
if a==SSS:
  print(0)
elif a=RRR:
  print(3)
elif a=RRS or a=SRR:
  print(2)
else:
  print(1)

Fixed submission:
a=input()
if a=="SSS":
  print(0)
elif a=="RRR":
  print(3)
elif a=="RRS" or a=="SRR":
  print(2)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
a=int(input())%1000
if a=0:
  print(a)
else:
  print(1000-a)



Fixed submission:
a=int(input())%1000
if a==0:
  print(a)
else:
  print(1000-a)