Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(b*4):
    print("Yes")
else:
    print("No")

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n,m=(map(int,input().split()))
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>sums/(b*4):
    print("Yes")
else:
    print("No")

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
top=0
sum=0
asp=0
n,m=list(map(int,input().split()))
a=list(map(int,input().split()))

for i in range(n):
    sum=sum+int(a[i-1])
    if a[i-1]<a[i] or i==1:
        top=int(a[i-1])

asp=float(1-(1/(4*m)))
asc=float((1/(4*m))
if top>sum*asp or top/asp>sum:
    print("No")
else:
    print("Yes")

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
top=0
sum=0
asp=0
n,m=list(map(int,input().split()))
a=list(map(int,input().split()))

for i in range(n):
    sum=sum+a[i-1]
    if a[i-1]<a[i] or i==1:
        top=a[n-1]
asp=1-(1/(4*m))
    if top>sum*asp:
        print("No")
    else:
        print("Yes")

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
top=0
sum=0
def sort(a,n):
    for i in range(n):
        sum=sum+a[i-1]
        if a[i-1]<a[i] or i==1:
            top=a[n-1]
asp=0
def am(m):
    asp=1-(1/(4*m))
    if top>sum*asp:
        print("No")
    else:
        print("Yes")

n,m=list(map(int,input().split()))
a=list(map(int,input().split()))

sort(a,n)
am(m)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
top=0
sum=0
def sort(a,n)
    for i in range(n):
        sum=sum+a[i-1]
        if a[i-1]<a[i] or i==1:
            top=a[n-1]
asp=0
def am(m):
    asp=1-(1/(4*m))
    if top>sum*asp:
        print("No")
    else:
        print("Yes")

n,m=list(map(int,input().split()))
a=list(map(int,input().split()))

sort(a,n)
am(m)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a=0
b=0
def ball(x,y):
    a=x*(x-1)//2
    b=y*(y-1)//2
    if a!=0 and b!=0:
        print(a+b)
    elif a=0:
        print(b)
    else:
        print(a)


n,m=list(map(int,input().split()))
ball(n,m)

Fixed submission:
n,m=list(map(int,input().split()))
x=0
if n<2 and m<2:
    x=0
elif n<2 :
    x=int(m*(m-1)/2)
elif m<2:
    x=int(n*(n-1)/2)
else:
    x=int(m*(m-1)/2+n*(n-1)/2)
print(x)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=(input().split())
for i in range(n):
    x=0
    for j in range(n):
        for k in range(n):
            if j>k:
                if a[j]==a[k] and j!=i and k!=i:
                    x=x+1
    print(x)


Fixed submission:
n,m=list(map(int,input().split()))
x=0
if n<2 and m<2:
    x=0
elif n<2 :
    x=int(m*(m-1)/2)
elif m<2:
    x=int(n*(n-1)/2)
else:
    x=int(m*(m-1)/2+n*(n-1)/2)
print(x)
Buggy python submission (verdict: Runtime Error):
def kaibun(s):
    for _ in range(n//2):
        if s[_]==s[n-_-1]:
            continue
        else:
            return False
    return True

s=input()
n=len(s)
if kaibun(s) and kaibun(s[:(n-1)//2])and kaibun(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")

Fixed submission:
s=input()
n=len(s)
s1=s[:(n-1)//2]
flag=0
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

s1=s[(n+3)//2-1:]
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

for i in range(n//2):
    if s[i]!=s[-1-i]:
        flag=1
        break

if flag==1:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s=input()
n=len(s)
flag=0


for i in range((n-1)//2):
    if s[i]==s[n-1-i]==s[((n-1)//2)-1-i]:
        flag=flag+1

if v==((n-1)//2)
    print("Yes")
else:
    print("No")

Fixed submission:
s=input()
n=len(s)
s1=s[:(n-1)//2]
flag=0
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

s1=s[(n+3)//2-1:]
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

for i in range(n//2):
    if s[i]!=s[-1-i]:
        flag=1
        break

if flag==1:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
a=int(h/2)+1
b=h/2
c=0


for j in range(w):
        if j%2==1:
            c=c+a
        else:
            c=c+b
    





print(c)

Fixed submission:
k=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
s=int(input())
s=s-1
print(k[s])

Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
a=0
b=0
c=0
for i in range(h):
    if i%2==0:
        a=a+1
for j in range(w):
    if j%2==1:
        b=b+1
c=a+b
print(c)

Fixed submission:
k=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
s=int(input())
s=s-1
print(k[s])

Buggy python submission (verdict: Runtime Error):
k[]={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51}
s=input()
print(k[s-1])

Fixed submission:
k=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
s=int(input())
s=s-1
print(k[s])
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
for i in range(h):
    if i%2==0:
        a=a+1
for j in range(w):
    if j%2==1:
        b=b+1
c=a+b
print(c)

Fixed submission:
h, w = map(int, input().split())
a=0
if h==1 or w==1:
    a=1
elif h%2==1 and w%2==1:
    a=int(h*w/2)+1
else:
    a=int(h*w/2)

print(a)
Buggy python submission (verdict: Runtime Error):
def Judgement(x,y,z):
    if z-x-y>0 and (z-x-y)**2-4*x*y>0:
        return 0
    else:
        return 1

a,b,c=map(int,input().split())
ans=Judgement(a,b,c)
if ans=0:
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
def Judgement(x,y,z):
    if z-x-y-2*(x*y)**(1/2)<=0:
        return -1
    elif z-x-y<=0:
        return -1
    elif (z-x-y)**2-4*x*y<=0
        return -1
    else:
        return 0

a,b,c=map(int,input().split())
ans=Judgement(a,b,c)
if ans=-1:
    print("No")
else:
    print("Yes")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

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

if c-b-a>0 and {(c-a-b)**2}-4*a*b>0 :
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

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

if c-b-a>0 and (c-a-b)**2-4ab>0 :
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import math
x,y,z = map(long, input().split())

a=math.sqrt(x)
b=math.sqrt(y)
ab=2*a*b

if z-x-y-ab>0:
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import math
x,y,z = map(int, input().split())

a=math.sqrt(x)
b=math.sqrt(y)
c=math/sqrt(z)

aa=a**2
bb=b**2
cc=c**2
ab=2*a*b

if cc-aa-bb-ab>0:
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import math
x,y,z = map(int, input().split())

a=math.sqrt(x)
b=math.sqrt(y)
c=math/sqrt(z)

aa=a**2
bb=b**2
cc=c**2
ab=2*a*b

if cc-aa-bb-ab>0:
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")

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

cc=c**2
aa=a**2
bb=b**2
ab=math.sqrt(2ab)

if cc-aa-bb-ab>0:
    print("Yes")
else:
    print("No")

Fixed submission:
import math
a,b,c = map(int, input().split())
x=a**2+b**2+c**2+2*a*b-2*b*c-2*a*c
y=4*a*b

if c-b-a>0 and x-y>0 :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s=input()
if s="AAA"or s="AAB"or s="ABA"or s="ABB"or s="BBA"or s="BAB"or s="BBA":
    print("Yes")
else:
    print("No")

Fixed submission:
S=set(input())

if len(S)==1:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s=input()
if s="AAA","AAB","ABA","ABB","BBA","BAB","BBA":
    print("Yes")
else:
    print("No")

Fixed submission:
S=set(input())

if len(S)==1:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
n,b,r=list(int,input().split())

m=n%(b+r)
l=n//(b+r)

if m<b:
    s=b
else:
    s=m

if m!=0:
    n_b=l*b+s
else:
    n_b=l*b

print(n_b)

Fixed submission:
n,b,r=list(map(int,input().split()))

m=n%(b+r)
l=n//(b+r)
x=n-l*(b+r)

if x<b:
    s=m
else:
    s=b

if m==0:
    n_b=l*b
else:
    n_b=l*b+s
print(n_b)
Buggy python submission (verdict: Runtime Error):
def judgement(s,c,n,m):
    for i in range(m):
        for j in range(m):
            if (s[i]==s[j] and c[i]!=c[j]) or (s[i]==1 and c[i]==0):
                return False
    return True

def num(m,n,c,s,x):
    for i in range(n):
        for j in range(m):
            if s[i]-1==j:
                x[j]=c[i]
                #print(m,n,c,s,x)
    #print(m,n,c,s,x)
    if x[0]==0:
        x[0]==1
    x="".join(map(str,x))
    print(x)

n,m=list(map(int,input().split()))
s=[0]*m
c=[0]*m
x=[0]*n
for i in range(m):
    a=list(map(int,input().split()))
    s[i]=a[0]
    c[i]=a[1]
for i in range(n):
    x[i]=0

r=judgement(s,c,n,m)
if (r==True):
    num(m,n,c,s,x)
else:
    print(-1)

Fixed submission:
N, M = (int(x) for x in input().split())

A = [list(map(int, input().split())) for i in range(M)]

X = ['0' for i in range(N)]#0で埋めつくす
X[0] = '1'
for i in A:
    X[i[0] - 1] = str(i[1])#条件関係なしに代入
    #print(X)

F = 1
for i in A:
    if N > 1 and i[0] == 1 and i[1] == 0:#条件から逸脱する条件
        F = 0
    for j in A:
        #print(j)
        if i[0] == j[0] and i[1] != j[1]:
            F = 0
            
if N == 1 and M == 0:
    print(0)
elif F == 1:
    print(''.join(X))
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
def judgement(s,c,n,m):
    for i in range(m):
        for j in range(m):
            if (s[i]==s[j] and c[i]!=c[j]) or (s[i]==1 and c[i]==0):
                return False
    return True

def num(m,n,c,s,x):
    for i in range(n):
        for j in range(m):
            if s[i]-1==j:
                x[j]=c[i]
                #print(m,n,c,s,x)
    #print(m,n,c,s,x)
    x="".join(map(str,x))
    print(x)

n,m=list(map(int,input().split()))
s=[0]*m
c=[0]*m
x=[0]*n
for i in range(m):
    a=list(map(int,input().split()))
    s[i]=a[0]
    c[i]=a[1]
for i in range(n):
    x[i]=0

r=judgement(s,c,n,m)
if (r==True):
    num(m,n,c,s,x)
else:
    print(-1)

Fixed submission:
N, M = (int(x) for x in input().split())

A = [list(map(int, input().split())) for i in range(M)]

X = ['0' for i in range(N)]#0で埋めつくす
X[0] = '1'
for i in A:
    X[i[0] - 1] = str(i[1])#条件関係なしに代入
    #print(X)

F = 1
for i in A:
    if N > 1 and i[0] == 1 and i[1] == 0:#条件から逸脱する条件
        F = 0
    for j in A:
        #print(j)
        if i[0] == j[0] and i[1] != j[1]:
            F = 0
            
if N == 1 and M == 0:
    print(0)
elif F == 1:
    print(''.join(X))
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
ac=0
ans=[True]*n
wa=[0]*n
for i in range(m):
    p,s=input().split()
    p=int(p)-1
    if s=="AC" and ans[p]:
        ans[p]=False
        ac+=1
    elif s=="WA" and ans[p]:
        wa[p]+=1

cnt=0
for i in range(n):
    if not ans[i]:
        cnt+=wa[i]

print(ac,cnt)

Fixed submission:
from collections import defaultdict
import heapq
import math

H, W = map(int, input().split())

edges = defaultdict(list)
field = []

for _ in range(H):
    field.append(input())

weight = 1
for i in range(H):
    for j in range(W):
        if j + 1 < W and field[i][j] == '.' and field[i][j + 1] == '.':
            edges[W * i + j].append((W * i + j + 1, weight))
            edges[W * i + j + 1].append((W * i + j, weight))
        if i + 1 < H and field[i][j] == '.' and field[i + 1][j] == '.':
            edges[W * i + j].append((W * (i + 1) + j, weight))
            edges[W * (i + 1) + j].append((W * i + j, weight))


def dijkstra(s):
    que = []
    dist = [float('inf')] * (H * W)
    dist[s] = 0
    heapq.heappush(que, (0, s))

    while que:
        p = heapq.heappop(que)
        v = p[1]
        if dist[v] < p[0]:
            continue
        for i in range(len(edges[v])):
            e = edges[v][i]
            if dist[e[0]] > dist[v] + e[1]:
                dist[e[0]] = dist[v] + e[1]
                heapq.heappush(que, (dist[e[0]], e[0]))

    dist = [0 if d == float('inf') else d for d in dist]
    return dist


ans = 0
for i in range(H*W):
    ans = max(ans, max(dijkstra(i)))

print(ans)
Buggy python submission (verdict: Runtime Error):
n,m=list(map(int,input().split()))
s=list(map(int,input().split()))

a.sort()
term=[]
if n-m>=0:
    print(0)
else:
    for i in range(m-1):
        term.append(s[i+1]-s[i])
    
    term.sort()

    for i in range(n-1):
        del term[-1]
    
    print(sum(term))

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

s.sort()
term=[]
if n-m>=0:
    print(0)
else:
    for i in range(m-1):
        term.append(s[i+1]-s[i])
    
    term.sort()

    for i in range(n-1):
        del term[-1]
    
    print(sum(term))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
Alist=[int(i) for i in input().split(" ")]
Blist=[int(i) for i in input().split(" ")]
sumA=sum(Alist)
sumB=sum(Blist)
Dlist=[]
muinus=0
muinus_num=0
count=0
if sumA<sumB:
    print(-1)
else:
    for i in range(n):
        AB=Alist[i]-Blist[i]
        Dlist.append(AB)
        if AB<0:
            muinus+=AB
            muinus_num+=1
    while muinus<0:
        muinus+=max(Dlist)
        Dlist.remove(max(Dlist))
        count+=1
    print(muinus_num+count)

Fixed submission:
n=int(input())
Alist=[int(i) for i in input().split(" ")]
Blist=[int(i) for i in input().split(" ")]
sumA=sum(Alist)
sumB=sum(Blist)
Dlist=[]
muinus=0
muinus_num=0
count=0
if sumA<sumB:
    print(-1)
else:
    for i in range(n):
        AB=Alist[i]-Blist[i]
        Dlist.append(AB)
        if AB<0:
            muinus+=AB
            muinus_num+=1
    Dlist.sort(reverse=True)
    while muinus<0:
        muinus+=Dlist[count]
        count+=1
    print(muinus_num+count)
Buggy python submission (verdict: Runtime Error):
#B

import numpy as np
D = int(input())
C = list(map(int,input().split()))
S = np.empty((D,26))
for i in range(D):
    l = list(map(int,input().split()))
    for j in range(26):
        S[i][j] = l[j]
        
#開催日時の記録
R = np.zeros(26)

sc = 0
for i in range(1,D+1):
    
    #ランダムに開催するコンテストを選ぶ
    con = int(input()) - 1
    
    #スコア計算
    #コンテスト開催による上昇
    sc += S[i-1][con]
    R[con] = i
    
    #コンテスト非開催による減少
    for j in range(26):
        sc -= C[j]*(i-R[j])
        
    print(sc)

Fixed submission:
#B

import numpy as np
D = int(input())
C = list(map(int,input().split()))
S = np.empty((D,26))
for i in range(D):
    l = list(map(int,input().split()))
    for j in range(26):
        S[i][j] = l[j]
        
#開催日時の記録
R = np.zeros(26)

sc = 0

#与えられたtでスコアを計算
for i in range(1,D+1):
    
    #ランダムに開催するコンテストを選ぶ
    con = int(input()) - 1
    
    #スコア計算
    #コンテスト開催による上昇
    sc += S[i-1][con]
    R[con] = i
    
    #コンテスト非開催による減少
    for j in range(26):
        sc -= C[j]*(i-R[j])
        
    print(int(sc))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s=0
for i in range(1,N+1):
    n = int(N/i)
    s += n*(i+i*n)/2
print(int(s))

Fixed submission:
N = int(input())

s=0
for i in range(1,N+1):
    n = int(N/i)
    s += n*(i+i*n)/2
print(int(s))
Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())
ans = 0
for i in range(1000):
  j = k*i - a
  if a <= j and j <= b:
    print('OK')
    break
  elif:
    print('NG')

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

for i in range(b+1):
    s = k*i
    if a <= s and s <= b:
        print('OK')
        break
    elif s > b:
        print('NG')
        break
Buggy python submission (verdict: Time Limit Exceeded):
import math
mat =[]
a, b, n = map(int, input().split())
for x in range(n+1):
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    mat.append(ans)
    if mat[x] < mat[x-1]:
        break
print(max(mat))

Fixed submission:
a, b, n = map(int, input().split())
x = min(b-1, n)
s = (a*x) // b - a * (x // b)
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
import math
mat =[]
a, b, n = map(int, input().split())
for x in range(n+1):
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    mat.append(ans)
print(max(mat))

Fixed submission:
a, b, n = map(int, input().split())
x = min(b-1, n)
s = (a*x) // b - a * (x // b)
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
import math
mat =[]
a, b, n = map(int, input().split())
for x in range(n+1):
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    mat.append(ans)

mat.sort(reverse=True)
print(mat[0])

Fixed submission:
a, b, n = map(int, input().split())
x = min(b-1, n)
s = (a*x) // b - a * (x // b)
print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list([input() for i in range(n)])
z = 0
for i in range(n):
  a[i] = int(a[i])
  if a[i] > z:
    z = i+1

print(sum(a)-a[z]/2)

Fixed submission:
n = int(input())
a = list([input() for i in range(n)])
z = 0
ax = 0
for i in range(n):
    a[i] = int(a[i])
    if a[i] > ax:
        z = i
        ax = a[i]
        
print(int(sum(a)-a[z]/2))
Buggy python submission (verdict: Runtime Error):
x = int(input())
a = False
if x = 7 or x = 5 or x = 3:
  a = True
  
print('YES' if a else 'NO')

Fixed submission:
x = int(input())
a = False
if x == 7 or x == 5 or x == 3:
  a = True
  
print('YES' if a else 'NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n == 1:
  print('Hello World')
  exit()
else:
  a = list(map(int, input().split()))
  print(a[0]+a[1])

Fixed submission:
n = int(input())

if n == 1:
    print('Hello World')
    exit()
else:
    a = list([input() for i in range(2)])
    print(int(a[0])+int(a[1]))
Buggy python submission (verdict: Runtime Error):
n = input()

if n = 111:
  print(999)
elif n = 119:
  print(991)
elif n = 191:
  print(919)
elif n = 199:
  print(911)
elif n = 911:
  print(199)
elif n = 919:
  print(191)
elif n = 991:
  print(199)
else:
  print(111)

Fixed submission:
n = int(input())
 
if n == 111:
    print(999)
elif n == 119:
    print(991)
elif n == 191:
    print(919)
elif n == 199:
    print(911)
elif n == 911:
    print(199)
elif n == 919:
    print(191)
elif n == 991:
    print(119)
elif n == 999:
    print(111)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input())

print((a-1)*(b-1))

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

print((a-1)*(b-1))
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n%4 == 0　or n%7 == 0:
  print('Yes')
  exit()
 
for _ in range(n//7):
  n -=7
if n == 4:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())
a = n//4
b = n//7
ans = False

for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans = True

if ans == True:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())
if n%4 ==0　or n%7 == 0:
  print('Yes')
  exit()
 
for _ in range(n//7):
  n -=7
if n == 4:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())
a = n//4
b = n//7
ans = False

for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans = True

if ans == True:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
s = input()
k = False
if s[0] == 'A' and s[2:-1].count('C') == 1:
    t = s[1:s.find('C')] + s[s.find('C')+1:]
    k = t.islower():
print('AC' if k else 'WA')

Fixed submission:
s = str(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower():
    print('AC')
else:
    print('WA')

Buggy python submission (verdict: Runtime Error):
s = input()
k = False
if s[0] != 'A':
    print('WA')
    exit()
else:
    for i in range(len(s)-1):
        if s[i] == 'C':
            s = s[1:i-1] + s[i+1:]
            k =s.islower()
print('AC' if k else 'WA')

Fixed submission:
s = str(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower():
    print('AC')
else:
    print('WA')

Buggy python submission (verdict: Runtime Error):
s = str(input())
 
if s[0] != 'A':
    print('WA')
    break
else:
    for i in range(len(s)-1):
        if s[i] == 'C':
            s = s[1:i-1] + s[i+1:]
            break
    if s.islower() == True:
        print('AC')
    else:
        print('WA')

Fixed submission:
s = str(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower():
    print('AC')
else:
    print('WA')

Buggy python submission (verdict: Runtime Error):
s = str(input())

if s[0] != A:
    print('WA')
    break
else:
    for i in range(len(s)-1):
        if s[i] == C:
            s = s[1:i-1] + s[i+1:]
            break
    if s.islower() == True:
        print('AC')
    else:
        print('WA')

Fixed submission:
s = str(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower():
    print('AC')
else:
    print('WA')

Buggy python submission (verdict: Runtime Error):
s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper() or s[1].isuuper():
            print('WA')
            exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

Fixed submission:
s = str(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower():
    print('AC')
else:
    print('WA')