Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(3)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

Fixed submission:
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

Buggy python submission (verdict: Runtime Error):
S=input("Enter String: ")
N=len(S)
B=int(input("Enter K: "))
K=B-1
if N<0 or N>50:
  print("Error")
else:
  A=S[:K]+S[K].lower()+S[K+1:]
  print(A)

Fixed submission:
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)
Buggy python submission (verdict: Runtime Error):
a = input()
b= input()
a=int(a)
b=int(b)
c= int(b/2)
if a>12:
  print(b)
elif a<=12 and a>=6:
  print(c)
else:
  print(0)

Fixed submission:
a = input()
s = a.find(' ')
a+= "."
b = a[s+1:-1]
a= a[0:s]
a=int(a)
b=int(b)
c= int(b/2)
if a>12:
  print(b)
elif a<=12 and a>=6:
  print(c)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
input = lambda: stdin.readline().rstrip("\r\n")
from collections import defaultdict as vector, deque as que
read = lambda: list(map(int,input().split()))
from bisect import bisect
from heapq import heappush as hpush,heappop as hpop

n,m,k=read()
A=read()
B=read()
a,b=[0],[0]
for i in range(n):
	a.append(a[i]+A[i])
for i in range(m):
	b.append(b[i]+B[i])
ans=0
for i in range(0,n+1):
	curr=a[i]
	j=m
	if curr>k:
		break
	while(b[j]>k-curr):
		j-=1
	ans=max(ans,i+j)
print(ans)



Fixed submission:
from sys import stdin
input = lambda: stdin.readline().rstrip("\r\n")
from collections import defaultdict as vector, deque as que
read = lambda: list(map(int,input().split()))
from bisect import bisect
from heapq import heappush as hpush,heappop as hpop

n,m,k=read()
A=read()
B=read()
a,b=[0],[0]
for i in range(n):
	a.append(a[i]+A[i])
for i in range(m):
	b.append(b[i]+B[i])
ans=0;j=m
for i in range(0,n+1):
	curr=a[i]
	if curr>k:
		break
	while(b[j]>k-curr):
		j-=1
	ans=max(ans,i+j)
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 14:53:59 2020

@author: 17664
"""

yomi = {2:'hon', 4:'hon', 5:'hon', 7:'hon', 9:'hon', 0:'pon', 1:'pon',
        6:'pon', 8:'pon', 3:'bon'}

print(yomi[input()[-1]])

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 14:53:59 2020

@author: 17664
"""

yomi = {2:'hon', 4:'hon', 5:'hon', 7:'hon', 9:'hon', 0:'pon', 1:'pon',
        6:'pon', 8:'pon', 3:'bon'}

print(yomi[int(input()[-1])])
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Spyderエディタ

これは一時的なスクリプトファイルです
"""

n = int(input())

kList = []
for _ in range(n):
    keihin = input()
    if kList:
        if keihin not in kList:
            kList.append(keihin)
    else:
        kList.append(keihin)

print(len(kList))

Fixed submission:
# -*- coding: utf-8 -*-
"""
Spyderエディタ

これは一時的なスクリプトファイルです
"""

n = int(input())

kList = []
for _ in range(n):
    kList.append(input())  
    
print(len(set(kList)))
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(s) for s in input().split()]

a, b = b, a
a, c = c, a

print(' '.join([a, b, c])

Fixed submission:
a, b, c = input().split()
 
a, b = b, a
a, c = c, a
 
print(' '.join([a, b, c]))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

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

point = [k] * n

for _ in range(q):
    answer = int(input()) - 1
    for i in range(n):
        if i != answer:
            point[i] -= 1

for j in point:
    if j > 0:
        print('Yes')
    else:
        print('No')


Fixed submission:
# -*- coding: utf-8 -*-

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

point = [k - q] * n

for _ in range(q):
    answer = int(input()) - 1
    point[answer] += 1

for j in point:
    if j > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
arrayP = [int(s) for s in input().split()]

cnt = 0

for i in range(0, n-2):
    threeNums = arrayP[i:i+3].sort()
    if threeNums[1] == arrayP[i+1]:
        cnt += 1

print(cnt)


Fixed submission:
# -*- coding: utf-8 -*-

n = int(input())
arrayP = [int(s) for s in input().split()]
 
cnt = 0
 
for i in range(0, n-2):
    threeNums = arrayP[i:i+3]
    threeNums.sort()
    if threeNums[1] == arrayP[i+1]:
        cnt += 1
 
print(cnt)
Buggy python submission (verdict: Runtime Error):
n, k = [int(s) for s in input().split()]
s = input()

print(s[:k-1] + lower(s[k-1]) + s[k:])


Fixed submission:
n, k = map(int, input().split())
s = input()

newS = s[:k-1]+s[k-1].lower()+s[k:]

print(newS)

Buggy python submission (verdict: Runtime Error):
n, k = [int(s) for s in input().split()]
s = input()

print(s[:k-1] + lower(s[k-1]) + s[k])


Fixed submission:
n, k = map(int, input().split())
s = input()

newS = s[:k-1]+s[k-1].lower()+s[k:]

print(newS)
Buggy python submission (verdict: Runtime Error):
a = [7, 5, 3]
x = int(input())

if x in a:
    print('YES)
else:
    print('NO')


Fixed submission:
a = [7, 5, 3]
x = int(input())
 
if x in a:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = input()

while len(s) > 4:
    if s[-5:] == 'deram' or s[-5:] == 'erase:
        s = s[:-5]
        continue
    elif s[-6:] == 'eraser':
        s = s[:-6]
        continue
    elif s[-7:] == 'dreamer':
        s = s[:-7]
        continue
    else:
        break
    
if len(s) == 0:
    print('YES')
else:
    print('NO')



Fixed submission:
s = input()

while len(s) > 4:
    if s[-5:] == 'dream' or s[-5:] == 'erase':
        s = s[:-5]
        continue
    elif s[-6:] == 'eraser':
        s = s[:-6]
        continue
    elif s[-7:] == 'dreamer':
        s = s[:-7]
        continue
    else:
        break
        
if len(s) == 0:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = input()

while len(s):
    if s[-5:] == 'deram' or s[-5:] == 'erase:
        s = s[:-5]
        continue
    elif s[-6:] == 'eraser':
        s = s[:-6]
        continue
    elif s[-7:] == 'dreamer':
        s = s[:-7]
        continue
    else:
        break
    
if len(s) == 0:
    print('YES')
else:
    print('NO')



Fixed submission:
s = input()

while len(s) > 4:
    if s[-5:] == 'dream' or s[-5:] == 'erase':
        s = s[:-5]
        continue
    elif s[-6:] == 'eraser':
        s = s[:-6]
        continue
    elif s[-7:] == 'dreamer':
        s = s[:-7]
        continue
    else:
        break
        
if len(s) == 0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
contName = input().split()
print(''.join([contName[0][0],contName[1][0],contName[2][0]])

Fixed submission:
# -*- coding: utf-8 -*-
contName = input().split()
print(contName[0][0]+contName[1][0]+contName[2][0])
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import re

text = input()
pattern = 'ST'

while True:
    if pattern in text:
        splt_txt = re.split(pattern, text)
        text = ''.join(splt_txt)
    else:
        break

print(len(text))


Fixed submission:
# -*- coding: utf-8 -*-

text = list(input())
txt_stuck = []

for i in text:
    if i == 'S':
        txt_stuck.append(i)
    elif i == 'T' and txt_stuck == []:
        txt_stuck.append(i)
    elif i == 'T' and txt_stuck[-1] == 'T':
        txt_stuck.append(i)
    elif i == 'T' and txt_stuck[-1] == 'S':
        txt_stuck.pop()

print(len(txt_stuck))
Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())
A='No'
for a in range(X+1):
  B=X-1
  if 2*a+4*B == Y
   	A='Yes'
print(A)

Fixed submission:
X, Y = map(int, input().split())
if Y>=2*X and Y<=4*X and Y%2==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
if (A>=0 and A<=100) and (B>=0 and B<=100):
  print("A X B =",A*B)
else:
  print (NA)

Fixed submission:
a,b = map(int,input().split())
print(a*b)
Buggy python submission (verdict: Runtime Error):
  N=int(input())
  A=list(map(int,input().split()))
  if 0 in A:
    print(0)
  prod=1
  for a in A:
    prod*=a
    if prod>10**18:
      print(-1)
   
  print(prod)

Fixed submission:
N = int(input())
L = input().split()
 
 
def mult():
    if "0" in L:
        return 0
    else:
        a = 1
        for i in L:
            a = a * int(i)
            if a > 1000000000000000000:
                return -1
        return a
 
print(mult())

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
    print (0)
    exit(0)
x=1
for i in A:
    x=x*i
if x>10**18:
    print(-1)
    exit(0)
print(x)

Fixed submission:
N = int(input())
L = input().split()
 
 
def mult():
    if "0" in L:
        return 0
    else:
        a = 1
        for i in L:
            a = a * int(i)
            if a > 1000000000000000000:
                return -1
        return a
 
print(mult())

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
    print (0)
    exit(0)
x=1
for i in A:
    x=x*i
if x>10**18:
    print(-1)
    exit(0)
print(x)

Fixed submission:
N = int(input())
L = input().split()
 
 
def mult():
    if "0" in L:
        return 0
    else:
        a = 1
        for i in L:
            a = a * int(i)
            if a > 1000000000000000000:
                return -1
        return a
 
print(mult())
Buggy python submission (verdict: Runtime Error):
K=int(input())
A=int(input())
B=int(input())
largest=(B/K)*K
if A<=largest:
  print("OK")
else:
  print("NG")

Fixed submission:
K = int(input())
A, B  = map(int, input().split())
X = B//K - A//K

if B%K == 0 or A%K == 0:
    print("OK")

elif X == 0 :
    print("NG")

else :
    print("OK")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A=int(input())
B=int(input())
if B-A>=7:
  print("OK")
elif K=="1":
  print("OK")
else:
  print("NG")

Fixed submission:
K = int(input())
A, B  = map(int, input().split())
X = B//K - A//K

if B%K == 0 or A%K == 0:
    print("OK")

elif X == 0 :
    print("NG")

else :
    print("OK")
Buggy python submission (verdict: Runtime Error):
S=int(input())
W=int(input())
if W>=S:
  print("unsafe")
else:
  print("safe")

Fixed submission:
S,W = map(int,input().split())
 
if S<=W:
  print('unsafe')
else:
  print('safe')

Buggy python submission (verdict: Runtime Error):
S=int(input())
W=int(input())
if W>=S:
  print("unsafe")
else:
  print("safe")

Fixed submission:
S,W = map(int,input().split())
 
if S<=W:
  print('unsafe')
else:
  print('safe')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = 0

for i in A:
    sum += i

if sum > N:
    print(-1)
else:
    print(n - sum)    

Fixed submission:
n,m = map(int,input().split())
A = list(map(int, input().split()))
 
a = sum(A)
 
ans = n-a
if ans < 0:
    ans = -1
 
print(ans)
Buggy python submission (verdict: Runtime Error):
X=int(input())
Y=int(input())
Z=int(input())
print(Z, X, Y)

Fixed submission:
X,Y,Z=input().split()
print(Z,X,Y)
Buggy python submission (verdict: Runtime Error):
N=int(input())
R=int(input())
if N>=10:
    print(R)
elif N<10:
    I=R+100(10-N)
    print(I)

Fixed submission:
N,R = map(int,input().split())
if N >= 10: print(R)
else: print(R + 100 * (10-N))
Buggy python submission (verdict: Runtime Error):
N,K,M = map(int,input().split())
a = list(map(int,input().split()))
now = sum(a)
goal = N*M
if now + K >= goal:
  if now >= goal:
    print(0)
  else:
    print(goal-now)
else:
  print(-1)

Fixed submission:
C=input()
N=ord(C)+1
M=chr(N)
print(M)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
ans=0
for i in range (0,n-2):
  if S[i]=="A" and S[i+1]=="B" and S[i+2]=="C":
    ans+=1
print(ans)

Fixed submission:
N=int(input())
S=input()
ans=0
for i in range (0,N-2):
  if S[i]=="A" and S[i+1]=="B" and S[i+2]=="C":
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int,input().split())
if(A>=K):
  print(A-K,B)
elif(B-K+A>=0):
  print(0,B-K+A)
else:
  print(0,0)


Fixed submission:
S, T=input().split()
print(T+S)

Buggy python submission (verdict: Runtime Error):
A, B, K = map(int,input().split())
if(A>=k):
  print(A-k,B)
elif(B-K+A>=0):
  print(0,B-K+A)
else:
  print(0,0)

Fixed submission:
S, T=input().split()
print(T+S)

Buggy python submission (verdict: Runtime Error):
S=input()
T=input()
print(T+S)

Fixed submission:
S, T=input().split()
print(T+S)

Buggy python submission (verdict: Runtime Error):
S=input()
T=input()
print("T"+"S")

Fixed submission:
S, T=input().split()
print(T+S)
Buggy python submission (verdict: Runtime Error):
A,B=map(int, input().split())
if (A==1 and B==2) or (A==2 and B==1):
  print(3)
elif (A==2 and B==3) or (A==3 and B==2):
  print(1)
elif (A==1 and B==3) or (A==3 and B==1):
  print(2)

Fixed submission:
A = int(input())
B = int(input())
print(6-A-B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S,T=input().split()
ans=S[0]+T[0]
for i in range(1,N):
    ans=ans+s[i]+T[i]
print(ans)

Fixed submission:
N=int(input())
S,T=input().split()
ans=S[0]+T[0]
for i in range(1,N):
    ans=ans+S[i]+T[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
D = input()
W = ['SUN','MON','TUE','WED','THU','FRI','SAT'] 
print(7 - l.index(D))

Fixed submission:
D = input()
W = ['SUN','MON','TUE','WED','THU','FRI','SAT'] 
print(7 - W.index(D))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
water = c-(a-b)
print(water if water > 0 else 0

Fixed submission:
A, B, C = map(int, input().split())
water = C-(A-B)
print(water if water > 0 else 0)
Buggy python submission (verdict: Runtime Error):
import math
 
def gooddistance(l1, l2):
    calc = []
    
    for i in range(len(l1)):
        calc.append((l1[i] - l2[i])**2)
 
    if math.sqrt(sum(calc)).is_integer():
        return 1
    else:
        return 0
 
 n, d = map(int, input().split())
lst = [list(map(int, input().split())) for _ in range(n)]
count = 0
 
for i in range(n):
    for j in range(i+1,n):
       count += gooddistance(lst[i],lst[j])
 
 print(count)

Fixed submission:
import numpy as np
N,D=map(int,input().split())
X=[np.array(input().split(),dtype=np.int64) for _ in range(N)]
ans=0
for i in range(N):
    for j in range(i+1,N):
        d=((X[i]-X[j])*(X[i]-X[j])).sum()
        dd=int(round(d**.5))
        if d==dd*dd:
            ans +=1
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import gcd
 
a,b=map(int, input().split())
c=input()
d=input()
 
e=gcd(n,m)
 
ae=a//e
be=b//e
 
for i in range(0,e):
    if c[ae*i]!=d[be*i]:
        print(-1)
        exit()
print(ae*be*e)

Fixed submission:
from math import gcd
 
n,m=map(int, input().split())
s=input()
t=input()
 
g=gcd(n,m)
 
ng=n//g
mg=m//g
 
for i in range(0,g):
    if s[ng*i]!=t[mg*i]:
        print(-1)
        exit()
print(ng*mg*g)
Buggy python submission (verdict: Runtime Error):
Num = str(input())
L = len(Num)
if Num[1:] == '9'*(l-1):
  val = int(Num[0]) + 9*(l-1)
else:
  val = int(Num[0])-1 + 9*(l-1)
print(val)

Fixed submission:
Num = str(input())
L = len(Num)
if Num[1:] == '9'*(L-1):
  val = int(Num[0]) + 9*(L-1)
else:
  val = int(Num[0])-1 + 9*(L-1)
print(val)
Buggy python submission (verdict: Runtime Error):
import sys
N, C, K = map(int, input().split())
A = list(map(int, sys.stdin.readlines()))+[10**10]
A.sort()
a, c, t = 0, 1, a[0]+k
for i in A[1:]:
    if i <= t and c < C:
        c += 1
    else:
        t, c = i + K, 1
        a += 1
 
print(a)

Fixed submission:
import sys
N, C, K = map(int, input().split())
A = list(map(int, sys.stdin.readlines()))+[10**10]
A.sort()
a, c, t = 0, 1, A[0]+K
for i in A[1:]:
    if i <= t and c < C:
        c += 1
    else:
        t, c = i + K, 1
        a += 1
 
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()
count = 0
sList = list(s)
tList = list(t)

for i in range(len(sList)):
    if sList == tList:
        break
    if sList[i] != tList[i]:
        sList[i] = tList[i]
        count = count + 1

print(count)



Fixed submission:
s = input()
t = input()
count = 0
sList = list(s)
tList = list(t)

for i in range(len(s)):
    if s[i] != t[i]:
        count = count + 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()
count = 0
sList = list(s)
tList = list(t)

for i in range(len(sList)):
    if sList == tList:
        break
    if sList[i] != tList[i]:
        sList[i] = tList[i]
        count = count + 1

print(count)

Fixed submission:
s = input()
t = input()
count = 0
sList = list(s)
tList = list(t)

for i in range(len(s)):
    if s[i] != t[i]:
        count = count + 1

print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())

a = list(map(int, input().split()))
ans = 1
if a.index(0):
    ans = (0)
else :
    for i in range(N):
        ans = ans * a[i]
        if ans > 10**18:
            ans = -1
            break
print(ans)

Fixed submission:
a, b = map(int, input().split())
print(a * b)
Buggy python submission (verdict: Runtime Error):
N = int(input())

a = list(map(int, input().split()))
ans = 1
for i in range(N):
    if a.index(0):
        ans = 0
        break
    ans = ans * a[i]
    if ans > 10**18:
        ans = -1
        break
print(ans)

Fixed submission:
N = int(input())

a = list(map(int, input().split()))
ans = 1
if 0 in a:
    ans = 0
else :
    for i in range(N):
        ans = ans * a[i]
        if ans > 10**18:
            ans = -1
            break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

a = list(map(int, input().split()))
ans = 1
for i in range(N):
    ans = ans * a[i]
if ans > 10**18:
    ans = -1
print(ans)

Fixed submission:
N = int(input())

a = list(map(int, input().split()))
ans = 1
if 0 in a:
    ans = 0
else :
    for i in range(N):
        ans = ans * a[i]
        if ans > 10**18:
            ans = -1
            break
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B = map(str, input().split())
A = int(A)
B = int(B.replace(',', ''))
print(A * B / 100)

Fixed submission:
A, B = map(str, input().split())
A = int(A)
B = int(B.replace('.', ''))
print(A * B // 100)

Buggy python submission (verdict: Runtime Error):
A, B = map(str, input())
A = int(A)
B = int(B.replace(',', ''))
print(A * B / 100)

Fixed submission:
A, B = map(str, input().split())
A = int(A)
B = int(B.replace('.', ''))
print(A * B // 100)
Buggy python submission (verdict: Runtime Error):
a=int(inupt())
print(a+a*a+a*a*a)

Fixed submission:
a=int(input())
print(a+a**2+a**3)
Buggy python submission (verdict: Runtime Error):
S=input(sheeps:)
W=input(wolfs:)

if S>W:
  print("safe")
else:
  print("unsafe")

Fixed submission:
s,w=map(int,input().split())

if s>w:
  print("safe")
else:
  print("unsafe")
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())

while True:
  C-=B
  if C<=0:
    input("Yes")
    break
  A-=D
  elif A<=0:
    input("No")
    break

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

while True:
  C-=B
  if C<=0:
    print("Yes")
    break
  A-=D
  if A<=0:
    print("No")
    break

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split)

while True:
  a-=d
  if a<=0:
    print("No")
    break
  c-=b
  if c=<0:
    print("Yes")
    break

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

while True:
  C-=B
  if C<=0:
    print("Yes")
    break
  A-=D
  if A<=0:
    print("No")
    break
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  N=int(input())
  n=list(map(int,input().split()))
  
  for i in range(N):
    print(n.count(i+1))
    
main()

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
A=[0]*N
for i in a:
  A[i-1]+=1
for i in A:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
n=list(map(int,input().split()))

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

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
A=[0]*N
for i in a:
  A[i-1]+=1
for i in A:
  print(i)
Buggy python submission (verdict: Runtime Error):
N=int(input)

print(sum(i for i in range(1,N+1) if i%3==0 or  i%5==0))

Fixed submission:
N=int(input())

print(sum(i for i in range(1,N+1) if i%3 and  i%5))
Buggy python submission (verdict: Runtime Error):
a,b,c=input()

print(c,a,b)

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

print(c,a,b)
Buggy python submission (verdict: Runtime Error):
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]=A[p]:
      A[p]=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")


Fixed submission:
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]==A[p]:
      A[p]=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]=A[p]:
      A[p]=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 0r A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")


Fixed submission:
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]==A[p]:
      A[p]=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]=A[p]:
      A=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 0r A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")

Fixed submission:
a0,a1,a2=map(int,input().split())
a3,a4,a5=map(int,input().split())
a6,a7,a8=map(int,input().split())
N=int(input())
b=[int(input()) for _ in range(N)]
A=[a0,a1,a2,a3,a4,a5,a6,a7,a8]

for i in range(N):
  for p in range(9):
    if b[i]==A[p]:
      A[p]=0
  
if A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split())

if A=B=C or A!=B!=C:
  print("No")
else:
  print("Yes")

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

if A==B==C or A!=B!=C!=A:
  print("No")
else:
  print("Yes")