Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int,input().split())

GCD = fractions.gcd(A,B)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

l = factorization(GCD)
if len(l) == 1:
    print(len(l))
else:
    print(len(l)+1)



Fixed submission:
import fractions
import sys
A, B = map(int,input().split())

GCD = fractions.gcd(A,B)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

l = factorization(GCD)
if len(l) == 1 and l[0][0] == 1:
    print(len(l))
else:
    print(len(l)+1)

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int,input().split())

GCD = math.gcd(A,B)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

l = factorization(GCD)
if len(l) == 1:
    print(len(l))
else:
    print(len(l)+1)

Fixed submission:
import fractions
import sys
A, B = map(int,input().split())

GCD = fractions.gcd(A,B)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

l = factorization(GCD)
if len(l) == 1 and l[0][0] == 1:
    print(len(l))
else:
    print(len(l)+1)
Buggy python submission (verdict: Time Limit Exceeded):
L,R = map(int, input().split())
X = L * R
min = 2018
for i in range(L,R):
    for j in range(i+1,R+1):
        n = (i*j)%2019
        if n<min:
            min = n
print(min)

Fixed submission:
L,R = map(int, input().split())
x = L // 2019
y = R // 2019
if y-x>0:
    min=0
else:
    min = 2018
    for i in range(L,R):
        for j in range(i+1,R+1):
            n = (i*j)%2019
            if n<min:
                min= n
print(min)
Buggy python submission (verdict: Runtime Error):
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
r1 = float(w/x)
r2 = float(h/y)
if (r1 == 2) and (r2 == 2):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

Fixed submission:
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
if (2*x == w) and (2*y == h):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

Buggy python submission (verdict: Runtime Error):
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
r1 = float(w/x)
r2 = float(h/y)
if w/x == h/y:
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

Fixed submission:
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
if (2*x == w) and (2*y == h):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

Buggy python submission (verdict: Runtime Error):
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
if w/x == h/y:
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

Fixed submission:
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
if (2*x == w) and (2*y == h):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))
Buggy python submission (verdict: Runtime Error):
import itertools
def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = int(input())
A = sieve(55555)
A.remove(2)
A.remove(3)
A.remove(5)
A.remove(7)
B = [2,3,5,7]
C = []
for i in A:
    if len(B) == n:
        break
    B.append(i)
    C = list(itertools.combinations(B,5))
    for j in C:
        if sum(j) in A:
            B.remove(i)
            break
for i in B:
    print(i,end=' ')

Fixed submission:
a,b = map(int ,input().split())
if b < a:
    a -=1
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
X = list(map(int,input().split()))
sX = sorted(X)
tsX = sX[:]
k = int(N/2-1)
for i in range(N):
    tsX.remove(X[i])
    print(tsX[k])
    tsX = sX[:]


Fixed submission:
N = int(input())
X = list(map(int,input().split()))
sX = sorted(X)
m1 = sX[int(N/2-1)]
m2 = sX[int(N/2)]
for i in X:
    if i<=m1:
        print(m2)
    else:
        print(m1)
Buggy python submission (verdict: Runtime Error):
    N,M = map(int, input().split())
    print(abs(N-2) * abs(M-2))

Fixed submission:
N, M = map(int, input().split())
print(abs(N-2)*abs(M-2))

Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
print(abs(N-2) * ans(M-2))

Fixed submission:
N, M = map(int, input().split())
print(abs(N-2)*abs(M-2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [i for i in range(N) input()]
k = 0
c = [ 0,0,0,0,0]
for i in A:
  if i[0] == m:
    c[0] += 1
  if i[0] == a:
    c[1] += 1
  if i[0] == r:
    c[2] += 1
  if i[0] == c:
    c[3] += 1
  if i[0] == h:
    c[4] += 1

if c.count(0) >= 3:
  k += c[0] * c[1] * c[2] + c[0] * c[1] * c[3] + c[0] * c[1] * c[4] + c[0] * c[2] * c[3] + c[0] * c[2] * c[4] + c[0] * c[3] * c[4] + c[1] * c[2] * c[3] + c[1] * c[2] * c[4] + c[1] * c[3] * c[4] + c[2] * c[3] * c[4] 

print(k)

Fixed submission:
N = int(input())
A = []
for i in range(N):
    A.append(input())
k = 0
c = [ 0,0,0,0,0]
for i in A:
  if i[0] == 'M':
    c[0] += 1
  if i[0] == 'A':
    c[1] += 1
  if i[0] == 'R':
    c[2] += 1
  if i[0] == 'C':
    c[3] += 1
  if i[0] == 'H':
    c[4] += 1


if not c.count(0) >= 3:
  k += c[0] * c[1] * c[2] + c[0] * c[1] * c[3] + c[0] * c[1] * c[4] + c[0] * c[2] * c[3] + c[0] * c[2] * c[4] + c[0] * c[3] * c[4] + c[1] * c[2] * c[3] + c[1] * c[2] * c[4] + c[1] * c[3] * c[4] + c[2] * c[3] * c[4] 

print(k)
Buggy python submission (verdict: Runtime Error):
c=[]
for i in range(3):
  c += [map(int,input())]
 
if c[0][0] + c[1][1]+ c[2][2] == c[1][0] + c[2][1] + c[0][2] == c[2][0] + c[0][1] + c[1][2]:
  print('Yes')
else:
  print('No')

Fixed submission:
c=[]
for i in range(3):
  A = list(map(int, input().split()))
  c.append(A)
if c[0][0] + c[1][1]+ c[2][2] == c[1][0] + c[2][1] + c[0][2] == c[2][0] + c[0][1] + c[1][2]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()

R_list = []
G_list = []
B_list = []
pair_list = []

for i in range(N):
    if S[i]=='R':
        R_list.append(i)
    elif S[i]=='G':
        G_list.append(i)
    else:
        B_list.append(i)

for i in R_list:
    for j in G_list:
        for k in B_list:
            pair_list.append([i,j,k])
        
count = 0
for pair in pair_list:
    pair.sort()
    if((pair[1]-pair[0])==(pair[2]-pair[1])):
        continue
    else:
        count += 1

#print(R_list)
#print(G_list)
#print(B_list)
#print(pair_list)
print(count)

Fixed submission:
N = input()

bool_7 = False

for i in N:
    if (int(i)== 7):
        bool_7 = True
        break

if bool_7:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
def main():
  n, k, c = map(int, input().split())
  ss = list(input())
  
  wd = [i for i, e in enumerate(ss) if e == 'o']
  wd_flg = [True for _ in wd]
  
  used = [0]
  cur = wd[0]
  if k != 1:
    for i, e in enumerate(wd):
      if e > cur + c:
        used.append(i)
        cur = e
        if len(used) == k:
          break
          
  used_rev = [len(wd)-1]
  cur = wd[-1]
  if k != 1: 
    for i, e in enumerate(wd[::-1]):
      if e < cur - c:
        used_rev.append(len(wd) - 1 - i)
        cur = e
        if len(used_rev) == k:
          break
  
  for i in used:
    if i not in used_rev:
      continue
    if used.index(i) + used_rev.index(i) >= k:
      continue
    else:
      print(wd[i]+1)
  
if __name__ == '__main__':
    main()

Fixed submission:
a, b, c = input().split()
print(c, a, b)

Buggy python submission (verdict: Runtime Error):
n, k, c = map(int, input().split())
ss = list(input())

wd = [i for i, e in enumerate(ss) if e == 'o']
wd_flg = [True for _ in wd]

used = [0]
cur = wd[0]
if k != 1:
  for i, e in enumerate(wd):
    if e > cur + c:
      used.append(i)
      cur = e
      if len(used) == k:
        break
        
used_rev = [len(wd)-1]
cur = wd[-1]
if k != 1: 
  for i, e in enumerate(wd[::-1]):
    if e < cur - c:
      used_rev.append(len(wd) - 1 - i)
      cur = e
      if len(used_rev) == k:
        break

for i in used:
  if i not in used_rev:
    continue
  if used.index(i) + used_rev.index(i) >= k:
    continue
  else:
    print(wd[i]+1)


Fixed submission:
a, b, c = input().split()
print(c, a, b)
Buggy python submission (verdict: Runtime Error):
l = float(input())
print((l/3)**3)

Fixed submission:
n, m = map(int,input().split())
print(int(n*(n-1)/2+m*(m-1)/2))
Buggy python submission (verdict: Runtime Error):

s = input()
len_s = len(s)
if s[:int((len_ s -1 ) /2)] != s[int((len_ s -1 ) / 2 +1):]:
    print('No')
else:
    tmp = s[:int((len_ s -1 ) /2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp ) %2 == 1:
            if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
                print('Yes')
            else:
                print('No')


Fixed submission:

s = input()
len_s = len(s)
if s[:int((len_s-1) /2)] != s[int((len_s-1) / 2 +1):]:
    print('No')
else:
    tmp = s[:int((len_s -1 ) /2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp ) %2 == 1:
            if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
                print('Yes')
            else:
                print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
len_s = len(s)
if s[:int((len_s-1)/2)] != s[int((len_s-1)/2+1):]:
    print('No')
else:
    tmp = s[:int((len_s-1)/2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp)%2 == 1:
	        if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
            	print('Yes')
        	else:
            	print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
            	print('Yes')
        	else:
            	print('No')
          


Fixed submission:

s = input()
len_s = len(s)
if s[:int((len_s-1) /2)] != s[int((len_s-1) / 2 +1):]:
    print('No')
else:
    tmp = s[:int((len_s -1 ) /2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp ) %2 == 1:
            if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
                print('Yes')
            else:
                print('No')
Buggy python submission (verdict: Runtime Error):
l = float(input())
print((l/3)^3)

Fixed submission:
l = float(input())
print((l/3)**3)
Buggy python submission (verdict: Runtime Error):
N = input()
p = []
for i in range(N):
    p.append(input())

print(sum(p)-max(p)//2)



Fixed submission:
a = input()
if a == "25":
    print("Christmas")
elif a == "24":
    print("Christmas Eve")
elif a == "23":
    print("Christmas Eve Eve")
else: print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
N = input()
p = []
for i in range(N):
    p.append(int(input()))

print(sum(p)-max(p)//2)



Fixed submission:
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

print(sum(p)-max(p)//2)

Buggy python submission (verdict: Runtime Error):
N = input()
p = []
for i in range(N):
    p.append(input())

print(sum(p)-max(p)//2)



Fixed submission:
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

print(sum(p)-max(p)//2)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
import math
K=int(input())
result=0
for i in range(1,K+1):
	for j in range(1,K+1):
		for k in range(1,K+1):
			result+=math.gcd(math.gcd(i,j),k)

print(result)

Fixed submission:
#coding:utf-8
from math import*
K=int(input())
result=0
for i in range(1,K+1):
	for j in range(1,K+1):
		for k in range(1,K+1):
			result+=gcd(gcd(i,j),k)

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
import math
K=int(input())
result=0
for i in range(K):
	for j in range(K):
		for k in range(K):
			result+=math.gcd(math.gcd(i+1,j+1),k+1)

print(result)

Fixed submission:
#coding:utf-8
from math import*
K=int(input())
result=0
for i in range(1,K+1):
	for j in range(1,K+1):
		for k in range(1,K+1):
			result+=gcd(gcd(i,j),k)

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
import math
from functools import reduce

K=int(input())
result=0
for i in range(K):
	for j in range(K):
		for k in range(K):
			result+=reduce(math.gcd,[i+1,j+1,k+1])

print(result)

Fixed submission:
#coding:utf-8
from math import*
K=int(input())
result=0
for i in range(1,K+1):
	for j in range(1,K+1):
		for k in range(1,K+1):
			result+=gcd(gcd(i,j),k)

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
N=int(input())
S=input()
comb=0
if N<3:
	comb=0
else:
	for i in range(N-2):
		for j in range(i+1,N-1):
			for k in range(j+1,N):
				if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k] and (j-i)!=(k-j):
					comb+=1
print(comb)

Fixed submission:
#coding:utf-8
N=int(input())
S=input()
r=S.count("R")
g=S.count("G")
b=S.count("B")
ans=r*b*g

for i in range(N-2):
	for d in range(N):
		j=i+d
		k=j+d
		if k>N-1:
			break
		elif S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
			ans-=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
def Lun(k):
	str_k=str(k)
	check=True
	if len(str_k)==1:
		return check
		
	for i in range(len(str_k)-1):
		if (int(str_k[i])+1)>=int(str_k[i+1])>=(int(str_k[i])-1):
			check=True
		else:
			check=False
			return check
	return check
K=int(input())
cnt=1
cnt_L=0
L=0
while True:
	if Lun(cnt):
		cnt_L+=1
		if cnt_L==K:
			L=cnt
			break
	cnt+=1

print(L)


Fixed submission:
#coding:utf-8
from collections import deque
K=int(input())
L=deque([1,2,3,4,5,6,7,8,9])
cnt=0
x=0
for _ in range(K):
	cnt+=1
	x=L.popleft()
	if x%10 !=0:
		L.append(10*x+x%10-1)
	L.append(10*x+x%10)
	if x%10!=9:
		L.append(10*x+x%10+1)

print(x)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:utf-8
import sys
N,K,C=map(int,input().split())
S=input()
S_R=S[::-1]
L=[0]*N
R=[0]*N
L_cnt=1
R_cnt=K
for i in range(N):
	if S[i]=="o" and L_cnt<=K:
		if L_cnt==1:
			L[i]=1
			L_cnt+=1
		elif i>(L.index(L_cnt-1)+C):
			L[i]=L_cnt
			L_cnt+=1
	if S_R[i]=="o" and R_cnt>=1:
		if R_cnt==K:
			R[N-1-i]=K
			R_cnt-=1
		elif (N-1-i)<(R.index(R_cnt+1)-C):
			R[N-1-i]=R_cnt
			R_cnt-=1	
result=[]
for i in range(N):
	if L[i]!=0 and R[i]!=0 and L[i]==R[i]:
		print(i+1)

Fixed submission:
#coding:utf-8
import sys
N,K,C=map(int,input().split())
S=input()
S_R=S[::-1]
L=[]
R=[]
loop=0
cnt=0
while (loop<N):
	if S[loop]=="o":
		L.append(loop+1)
		cnt+=1
		loop+=C+1
	else:
		loop+=1
	if cnt>K:
		break
if cnt<K:
	exit()
loop=0
cnt=0

while (loop<N):
	if S_R[loop]=="o":
		R.append(N-loop)
		cnt+=1
		loop+=C+1
	else:
		loop+=1
	if cnt>K:
		break
if cnt<K:
	exit()

R=R[::-1]
for i in range(K):
	if L[i]==R[i]:
		print(L[i])
Buggy python submission (verdict: Runtime Error):
4
aaaa
a
aaa
aa


Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append(input())
    
print(len(set(s)))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

for i in range(1,n+1):
    print(a.count(i))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
from collections import Counter
c=Counter(a)
for i in range(1,n+1):
    print(c[i])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()
import numpy as np

t=0
s_arr=np.array(list(s))
p=np.where(s_arr=='R')
R_ind=p[0]
p=np.where(s_arr=='G')
G_ind=p[0]
p=np.where(s_arr=='B')
B_ind=p[0]
k=len(B_ind)
len(R_ind)*len(G_ind)*len(B_ind)
for i in range(0,len(R_ind)):
    for j in range(0,len(G_ind)):
        r=R_ind[i]
        g=G_ind[j]
        m=abs(r-g)
        rb_diff=abs(B_ind-r)
        gb_diff=abs(B_ind-g)
        t=t+k-sum((rb_diff==m)*1+(gb_diff==m)*1+(rb_diff==gb_diff)*1)
print(t)


Fixed submission:
n=int(input())
s=input()
p=s.count('R')*s.count('G')*s.count('B')

for i in range(0,n-2):
    for j in range(1,int((n-i)/2)+1):
        if i+j*2>=n:
            break
        if s[i]!=s[i+j] and s[i]!=s[i+j*2] and s[i+j*2]!=s[i+j]:
            p-=1
print(p)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
import collections
def count_ident(v):
    c = collections.Counter(v)
    val_list=list(c.values())
    v_count=map(lambda x: x * (x-1), val_list)
    print(int(sum(v_count)/2))

for i in range(len(a)):
    tmp = list(a)    
    tmp.pop(i)
    count_ident(tmp)
    

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
import collections
c = collections.Counter(a)
val_list=list(c.values())
v_count=map(lambda x: x * (x-1), val_list)
total_count=int(sum(v_count)/2)

for i in a:
    print(total_count-(c[i]-1))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
import collections
def count_ident(v):
    c = collections.Counter(v)
    val_list=list(c.values())
    v_count=map(lambda x: x * (x-1), val_list)
    print(int(sum(v_count)/2))

for i in range(len(a)):
    tmp = list(a)    
    tmp.pop(i)
    count_ident(tmp)
    

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
import collections
c = collections.Counter(a)
val_list=list(c.values())
v_count=map(lambda x: x * (x-1), val_list)
total_count=int(sum(v_count)/2)

for i in a:
    print(total_count-(c[i]-1))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
import collections
import numpy as np
def count_ident(v):
    c = collections.Counter(v)
    val_list=np.array(list(c.values()))
    v_count=val_list*(val_list-1)/2
    print(int(sum(v_count)))

import copy
c = copy.deepcopy(a)    
for i in range(len(a)):
    tmp = copy.deepcopy(a)    
    tmp.pop(i)
    count_ident(tmp)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
import collections
c = collections.Counter(a)
val_list=list(c.values())
v_count=map(lambda x: x * (x-1), val_list)
total_count=int(sum(v_count)/2)

for i in a:
    print(total_count-(c[i]-1))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
import collections
def count_ident(v):
    c = collections.Counter(v)
    val_list=c.values()
    v_count=0
    for k in val_list:
        if k>1:
            v_count=v_count+int(k*(k-1)/2)
        else:
            v_count=v_count
    print(v_count)

import copy
c = copy.deepcopy(a)    
for i in range(len(a)):
    tmp = copy.deepcopy(a)    
    tmp.pop(i)
    count_ident(tmp)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
import collections
c = collections.Counter(a)
val_list=list(c.values())
v_count=map(lambda x: x * (x-1), val_list)
total_count=int(sum(v_count)/2)

for i in a:
    print(total_count-(c[i]-1))
Buggy python submission (verdict: Runtime Error):
import numpy as np
import itertools
[n,k]=map(int,input().split())
a=np.array(list(map(int,input().split())))

c=sorted([x * y for x, y in itertools.combinations(a,2)])
print(c[k-1])


Fixed submission:
a=list(map(int,input().split()))
check=0
if a[0]==a[1]:
    check+=1
if a[0]==a[2]:
    check+=1
if a[1]==a[2]:
    check+=1
if check==1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
[a0,b0,k]=input().split()
if a0>k:
	ak=a0-k
    bk=b0
else: 
	ak=0
  	bk=b0-(k-a0)

if bk<0:
  bk=0

print(ak,bk)
  
  
    
  


Fixed submission:
[a0,b0,k]=input().split()
a0=int(a0)
b0=int(b0)
k =int(k)
if a0>k:
    ak=a0-k
    bk=b0
else:
    ak=0
    bk=b0-(k-a0)

if bk<0:
    bk=0
    
print(ak,bk)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8

if __name__ == "__main__":

    i = str(input())

    j = i.split('/')

    if int(j[0]) < 2019:
        print("Heisei")
    elif int(j[1].split('0')[1]) < 5:
        print("Heisei")
    else:
        print("TBD")

Fixed submission:
#coding:utf-8

if __name__ == "__main__":

    i = str(input())

    j = i.split('/')

    if int(j[0]) < 2019:
        print("Heisei")
    elif int(j[1]) < 5:
        print("Heisei")
    else:
        print("TBD")

Buggy python submission (verdict: Runtime Error):
#coding:utf-8

if __name__ == "__main__":

    i = str(input())

    j = i.split('/')

    print(j[1].split('0')[1])

    if int(j[0]) < 2019:
        print("Heisei")
    elif int(j[1].split('0')[1]) < 5:
        print("Heisei")
    else:
        print("TBD")

Fixed submission:
#coding:utf-8

if __name__ == "__main__":

    i = str(input())

    j = i.split('/')

    if int(j[0]) < 2019:
        print("Heisei")
    elif int(j[1]) < 5:
        print("Heisei")
    else:
        print("TBD")
Buggy python submission (verdict: Runtime Error):
def main():
    s = input().split()
    n, m = list(map(int, input().split()))
    d = input()
    #print(s)
    if s[0] == d:
        print(n - 1, m)
    else:
        print(n, m - 1)


if __name__

Fixed submission:
def main():
    s = input().split()
    n, m = list(map(int, input().split()))
    d = input()
    #print(s)
    if s[0] == d:
        print(n - 1, m)
    else:
        print(n, m - 1)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    import math
    def f(m, n, k):
        return int(math.factorial(n-1-m)/(math.factorial(k-1)*math.factorial(n-k-m)))
    n, k = list(map(int, input().split()))
    a = list(map(int, input().split()))
    a = sorted(a)
    # print(a)
    ans = 0
    law = int(pow(10, 9) + 7)
    for i in range(n - k + 1):
        # print(i, n, k)
        # print(f(i, n, k))
        ans += (a[n-1-i] - a[i]) * f(i, n, k)
        ans = ans % law
    print(int(ans))
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    s = input()
    print(chr(ord(s) + 1))
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
a, b = input().split(' ')

c = int(b) - int(a)

print(int(a) - (c - 1))


Fixed submission:
n = input()

if int(n) < 1000:
    print('ABC')
else:
    print('ABD')