Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02658 (python)

Fixed submission:
def main ():
    N = int(input())
    A = list(map(int,input().split()))
    if 0 in A:
        print (0)
        return
    prod = 1 
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1) 
            return
    print(prod)

    
main ()

Buggy submission (verdict: Runtime Error):
N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
        if (int(SUM) < 10 ** 18):
            print(SUM)
        else:
        print(-1)

Buggy submission (verdict: Runtime Error):
def main():
    N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
         if (int(SUM) < 10 ** 18):
        	print(SUM)
        else:
        print(-1)
        
main()

Buggy submission (verdict: Runtime Error):
def main():
    N = input()

    ab = input( )

    ab = ab.split()
    
    if 0 in ab:
        print(0)


    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])
         if (int(SUM) < 10 ** 18):
        print(SUM)
        else:
        print(-1)
        
main()

Buggy submission (verdict: Runtime Error):
def main ():
N = int(input())
A = list(map(int,input().split()))
if 0 in A: print (0)
return
prod = 1 for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1) return
print(prod) main ()

Buggy submission (verdict: Runtime Error):
ab = input( )

ab = ab.split()

SUM = 1
for i in range(int(ab[0])):
    SUM = SUM * int(ab[i+1])
    
if (int(SUM) < 10 ** 18):
    print(SUM)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N = input()

A = []

for i in range(1,int(N)+1):
    a = input()
    A.append(a)

SUM = 1
for i in range(len(A)):
    SUM = SUM * int(A[i])
    
if (int(SUM) < 10 ** 18):
    print(SUM)
else:
    print(-1)
Problem p02657 (python)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy submission (verdict: Runtime Error):
input()
int_list = list(map(int, input().split()))
max_num = 10**18
ans = 1

if 0 in int_list:
   print(0)
   exit()
 
for i in int_list:
   ans *= i
   if ans > max_num:
       print(-1)
       break
else:
   print(ans)

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

T = 1 
for i in A:
    T = T * i
    if T > 10^18:
        print(-1)
    else:
        print(T)

Buggy submission (verdict: Runtime Error):
A, B = int(input())
print(A*B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(A*B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(A*B)

Buggy submission (verdict: Runtime Error):
A, B = map(int(input().split( )))
C = A*B
print(C)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = A*B
print(C)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
A*B

Buggy submission (verdict: Runtime Error):
A
B
A*B

Buggy submission (verdict: Runtime Error):
A*B
Problem p02658 (python)

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

a = 1
if 0 in list:
    print(0)
    exit()
else:
    for i in list:
        a *= i
        if a > 10**18:
            print(-1)
            exit()
print(a)

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
for y in range(x):
  C = 1*Y
  if C >= 10^18:
    print(-1)
  else:
    print(C)
Problem p03695 (python)

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

huriwake = [0, 0, 0, 0, 0, 0, 0, 0]
rea = 0
count = 0

for i in list:
    if i < 400:
        huriwake[0] = 1
    elif i < 800:
        huriwake[1] = 1
    elif i < 1200:
        huriwake[2] = 1
    elif i < 1600:
        huriwake[3] = 1
    elif i < 2000:
        huriwake[4] = 1
    elif i < 2400:
        huriwake[5] = 1
    elif i < 2800:
        huriwake[6] = 1
    elif i < 3200:
        huriwake[7] = 1
    else:
        rea += 1

for h in huriwake:
    if h == 1:
        count += 1

if count == 0 and rea > 0:
    count += 1
    rea -= 1

min = count

if rea > 0:
    count += rea

max = count

print("{0} {1}".format(min, max))

Buggy submission (verdict: Runtime Error):
N = int(input())
list = list(map(int, input().split()))

huriwake = [0, 0, 0, 0, 0, 0, 0, 0]
rea = 0
count = 0

for i in list:
    if i < 400:
        huriwake[0] = 1
    elif i < 800:
        huriwake[1] = 1
    elif i < 1200:
        huriwake[2] = 1
    elif i < 1600:
        huriwake[3] = 1
    elif i < 2000:
        huriwake[4] = 1
    elif i < 2400:
        huriwake[5] = 1
    elif i < 2800:
        huriwake[6] = 1
    elif i < 3200:
        huriwake[7] = 1
    else:
        rea += 1

for h in huriwake:
    if h == 1:
        count += 1

if count == 0 && rea > 0:
    count += 1

min = count

if rea > 0:
    count += rea
    if count > 8: count = 8

max = count

print("{0} {1}".format(min, max))
Problem p03693 (python)

Fixed submission:
num = input().split() 
temp = ''
for i in range(len(num)):
    temp = temp + num[i]
print( ['NO','YES'][int(temp)%4==0] )

Buggy submission (verdict: Runtime Error):
a = int(input().rstrip())
b = [ int(i) for i in input().split() ]
print(max(b)-min(b))
Problem p03760 (python)

Fixed submission:
o, e = [input().rstrip() for i in range(2)] 
ans = ""
for i in range(len(o)):
  ans += o[i]
  if len(e) > i: ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
O,E=[input().rstrip() for _ in range(2)]
for i in range(len(O)):
    print(O[i]+E[i],end="")
Problem p03860 (python)

Fixed submission:
a, b, c = input() .split()
print("A" + b[0] + "C")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input() .split())
e = []
for i in range(a, b+1):
    d = i % c
    if d == 0:
        e.append(i)
print(len(e))
Problem p03862 (python)

Fixed submission:
N,x=map(int,input().split())
S = [int(i) for i in input().split()]
pre,ans = 0,0
for i in range(N):
    tmp = pre+S[i]
    if tmp > x:
        ans += tmp-x
        S[i] -= tmp-x
    pre = S[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N,x=map(int,input().split())
S = map(int,input().split())
pre,ans = 0,0
for i in range(N):
    tmp = pre+S[i]
    if tmp > x:
        ans += tmp-x
        S[i] -= tmp-x
    pre = S[i]
print(ans)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(a*b)
Problem p02767 (python)

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
ans=[]
for i in range(min(l)+1,max(l)):
    w=0
    for j in range(n):
        w+=(l[j]-i)**2
    ans.append(w)

if len(ans)==0:
    print(0)
else:
    print(min(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
l=list(map(int ,input().split()))
ans=[]
for i in range(min(l)+1,max(l)):
    w=0
    for j in range(n):
        w+=(l[j]-i)**2
    ans.append(w)
    
print(min(ans))
Problem p02795 (python)

Fixed submission:
import math
h = int(input())
w = int(input())
n = int(input())

print(math.ceil(n/max(h,w)))

Buggy submission (verdict: Runtime Error):
h = list(input())
w = list(input())
n = list(input())

print(n//max(h,w))
Problem p02802 (python)

Fixed submission:
n,m=map(int, input().split())
acceted=set()
penalty=0
wa_cnt=[0]*(n+1)
for i in range(m):
    p,s=map(str, input().split())
    p=int(p)
    if p in acceted:
        continue
    if s=="AC":
        penalty+=wa_cnt[p]
        acceted.add(p)
    else:
        wa_cnt[p]+=1
print(len(acceted),penalty)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
p=[0]*(10**5+2)
s=[0]*m
for i in range(m):
	p[i],s[i]=map(str, input().split()) 
l=[0]*(m+1)
wal=[]
accnt=0
wacnt=0

for i in range(m):
	if l[int(p[i])]==0 and s[i]=='AC':
		l[int(p[i])]=1
		wal.append(wacnt)
		wacnt=0
	elif l[int(p[i])]==1 and s[i]=='AC':
		continue
	elif l[int(p[i])]==0 and s[i]=='WA':
		wacnt+=1
print(sum(l),sum(wal))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
p=[0]*m
s=[0]*m
for i in range(m):
	p[i],s[i]=map(str, input().split()) 
l=[0]*(m+1)
wal=[]
accnt=0
wacnt=0

for i in range(m):
	if l[int(p[i])]==0 and s[i]=='AC':
		l[int(p[i])]=1
		wal.append(wacnt)
		wacnt=0
	elif l[int(p[i])]==1 and s[i]=='AC':
		continue
	elif l[int(p[i])]==0 and s[i]=='WA':
		wacnt+=1
print(sum(l),sum(wal))
Problem p02818 (python)

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


i=a-k
if i<=0:
    j=b+i
    if j<=0:
        j=0
    i=0
    print(i,j)
else:
    print(i,b)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
if a>=k:
    a=a-k
elif a<k:
    i=abs(a-k)
    a=0
b=max(0,(b-i))
print(a,b)
Problem p02853 (python)

Fixed submission:
x,y = map(int ,input().split())
l=[300000,200000,100000,0]
if x>=4:
    x=4
if y>=4:
    y=4

if x==1 and y==1:
    print(1000000)
else:
    print(l[x-1]+l[y-1])

Buggy submission (verdict: Runtime Error):
x,y = map(int ,input().split())
l=[300000,200000,100000,0]
if x>=4:
    x=4
elif y>=4:
    y=4
        
if x==1 and y==1:
    print(1000000)
else:
    print(l[x-1]+l[y-1])
Problem p02923 (python)

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
ans=[]
count=0
for i in range(n-1):
    if l[i]>=l[i+1]:
        count+=1
    else:
        ans.append(count)
        count=0
ans.append(count)
print(max(ans))

Buggy submission (verdict: Runtime Error):
a = int(input())
l=list(map(int ,input().split()))
p=[]
ind=0
cont=0
while ind<a-1:
    if l[ind]>=l[ind+1]:
        cont+=1
        ind+=1
        p.append(cont)
    else:
        ind+=1
        cont=0
        p.append(cont)
        
print(max(p))
Problem p02934 (python)

Fixed submission:
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a):
        j=1/l[i]
        ll.append(j)
k=sum(ll)
print(1/k)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=float(1/p)
print(y)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=int(1/p)
print(y)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=float(1/p)
print(y)

Buggy submission (verdict: Runtime Error):
from fractions import Fraction
N=int(input())
l=[]
for i in range(N):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)

p=sum(l)
y=float(1/p)
print(y)
Problem p02969 (python)

Fixed submission:
a = int(input())
print(3*(a*a))

Buggy submission (verdict: Runtime Error):
a = int(input())
print(3*(a**2)
Problem p02971 (python)

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy submission (verdict: Runtime Error):
import copy
n=int(input())
l=[int(input()) for x in range(n)]
ans=[]
for i in range(n):
    ans=copy.copy(l)
    ans.remove(l[i])
    print(max(ans))
    ans.clear()

Buggy submission (verdict: Runtime Error):
n = int(input())
l=[int(input()) for x in range(n)]
ll=l
for i in range(n):
    l.pop(i)
    print(max(l))
    l.insert(i,ll[i])
Problem p03085 (python)

Fixed submission:
b=input()
if b=='A':
	print('T')
if b=='T':
	print('A')
if b=='C':
	print('G')
if b=='G':
	print('C')

Buggy submission (verdict: Runtime Error):
b=input()
if b=='A':
	print('T')
if b=='T':
	print('A')
if b=='C':
	print('G'):
if b=='G':
	print('C')
Problem p03086 (python)

Fixed submission:
n=list(input())
count=0
ans=[]
for i in range(len(n)):
    if n[i]=="A" or n[i]=="C" or n[i]=="G" or n[i]=="T":
        count+=1
    else:
        ans.append(count)
        count=0
ans.append(count)
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = input()
l=[]
count=0
for i in range(len(n)):
    if n[i]=="A" or n[i]=="C" or n[i]=="G" or n[i]=="T":
        count+=1
    else:
        l.append(count)
        count=0
print(max(l))
Problem p03145 (python)

Fixed submission:
a,b,c =map(int, input().split())
print(int(a*b/2))

Buggy submission (verdict: Runtime Error):
k=0
ind=0
l=[]
i=int(input())
l.append(i)
def guusuu():
    k=l[ind]/2
    return int(k)
    
def kisuu():
    k=l[ind]*3+1
    return int(k)

while ind<500:
    if l[ind]%2==0:
        l.append(guusuu())
    else:
        l.append(kisuu())
    ind+=1       

print((l.index(4))+4)

Buggy submission (verdict: Runtime Error):
k=0
ind=0
l=[]
i=int(input())
l.append(i)
def guusuu():
    k=l[ind]/2
    return int(k)
    
def kisuu():
    k=l[ind]*3+1
    return int(k)

while ind<1000:
    if l[ind]%2==0:
        l.append(guusuu())
    else:
        l.append(kisuu())
    ind+=1       

print((l.index(4))+4)
Problem p03161 (python)

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

dp=[float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,min(k+1,abs(n-i))):
        dp[i+j]=min(dp[i]+abs(l[i]-l[i+j]),dp[i+j])
print(dp[-1])

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

dp=[float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,min(k+1,abs(n-i))):
        dp[i+j]=min(dp[i]+abs(l[i]-l[i+j]),dp[i+j])
print(dp-1)
Problem p03239 (python)

Fixed submission:
n,t = map(int, input().split())
lst_c = []
lst_t = []
a = 0
b = 0
for i in range(n):
    a,b = map(int, input().split())
    if b <= t:
        lst_c.append(a)
if lst_c == []:
    print("TLE")
else:
    print(min(lst_c))

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
cl=[]
tl=[]
for i in range(a):
    c,t = map(int, input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
cl=[]
tl=[]
for i in range(a):
    c,t = map(int, input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
cl=[]
tl=[]
for i in range(a):
    c,t=map(int,input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))
Problem p03308 (python)

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
print(max(l)-min(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
l=list(map(int ,input().split()))
print((max(l)-min(l))
Problem p03385 (python)

Fixed submission:
s=list(input())
s.sort()
if s[0]=='a' and s[1]=='b' and s[2]=='c':
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=input()
l=soted(s)
if l[0]=='a' and l[1]=='b' and l[2]=='c':
  print('Yes')
else:
  print('No')
Problem p03386 (python)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
c=b-k
l=list(range(a,b+1))

for i in l[:k]:
    print(i)

if len(l)<=k:
    exit()

if (b-a+1)/2<=k:
    for i in l[k:]:
        print(i)
else:    
    for i in l[c:]:
        print(i)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
c=b-k
l=list(range(a,b+1))

for i in l[:k]:
    print(i)

if len(l)<=k:
    exit()

if (b-a+1)/2<k:
    for i in l[k:]:
        print(i)
else:    
    for i in l[c:]:
        print(i)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
c=a+k
d=b-k
for i in l:
	if i<(c) or i>(d):
		print(i)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
for i in l:
	if i<(a+k) or i>(b-k):
		print(i)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
for i in l:
	if i<(a+k) or i>(b-k):
		print(i)
Problem p03399 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(min(a,b)+min(c,d))

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

Fixed submission:
a,b= map(int, input().split())
if a*b%2==0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().input())
if (a*b)%2==0:
    print("Even")
else:
    print("Odd")
Problem p03474 (python)

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

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[a+1+i]=="-":
    print("No")
    exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
s=list(input())

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[((a+b)-a-1)+i]=="-":
    print("No")
    exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
s=list(input())

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[b+i]=="-":
    print("No")
    exit()

print("Yes")
Problem p03597 (python)

Fixed submission:
a=int(input())
b=int(input())
print((a*a)-b)

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

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

Fixed submission:
l=list(map(int, input().split()))
print(sum(l)-max(l))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input().split())
print(sum(a,b,c)-max(a,b,c))
Problem p03760 (python)

Fixed submission:
o=input()
e=input()
if len(o)!=len(e):
  for i in range(len(o)-1):
    print(o[i],end="")
    print(e[i],end="")
  print(o[-1])  
else:
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")

Buggy submission (verdict: Runtime Error):
o=input()
e=input()
if len(o)!=len(e):
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")
  print(o[-1])  
else:
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")
Problem p03778 (python)

Fixed submission:
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b:
    print(b-(a+w))
elif b+w<=a:
    print(a-(b+w))

Buggy submission (verdict: Runtime Error):
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b:
    print(b-(a+w))
elif b+w<a:
    print(a(-b+w))

Buggy submission (verdict: Runtime Error):
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b
    print(b-(a+w))
elif b+w<a:
    print(a(-b+w))
Problem p03826 (python)

Fixed submission:
l=list(map(int, input().split()))
print(max(l[0]*l[1],l[2]*l[3]))

Buggy submission (verdict: Runtime Error):
l=list(map(int, input().split()))
print(max(l[0]*l[1],l[2]*l[3])

Buggy submission (verdict: Runtime Error):
l=list(map(int, input().split())
print(max(l[0]*l[1],l[2]*l[3])
Problem p03844 (python)

Fixed submission:
a,b,c=list(input().split())
if b=="+":
        print(int(a)+int(c))
else:
        print(int(a)-int(c))

Buggy submission (verdict: Runtime Error):
a=input().split()
if a[1]=="+":
        print(a[0]+a[2])
else:
        print(a[0]-a[2])
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
print(int(((a+b)*c)/2))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
print(int(((a+b)*c)/2)
Problem p02953 (python)

Fixed submission:
input()
h=list(map(int,input().split()))
m=0
r=True
for i in h:
  r=i>=m-1
  if not(r):
    break
  m=max(m,i)
print("NYoe s"[r::2])

Buggy submission (verdict: Runtime Error):
a=int(input())
h=list(map(int,input().split()))
m=0
r=True
for i in h:
  m=max(m,i)
  if m!=i:
    r=i+1=<m
print("NYoe s"[r::2])
Problem p03280 (python)

Fixed submission:
print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

Buggy submission (verdict: Runtime Error):
n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >= 135 else 1 if n >= 105 else 0)

Buggy submission (verdict: Runtime Error):
n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else 2 if n >=n 135 else 1 if n >= 105 else 0)
Problem p03281 (python)

Fixed submission:
k = [104,134,164,188,194]
n = int(input())
k.append(n)
print(sorted(k).index(n))

Buggy submission (verdict: Runtime Error):
# a*b*c : 105, 165
# a^3*b : 135, 189

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >=n 135 else 1 if n >= 105 else 0)
Problem p03353 (python)

Fixed submission:
s = input()
r = []
for i in range(1,6):
  for j in range(len(s)-i+1):
    r.append(s[j:j+i])
print(sorted((set(r)))[int(input())-1])

Buggy submission (verdict: Runtime Error):
s = input()
r = []
for i in range(1,6):
  for j in range(len(s)-i):
    r.append(s[j:j+i])
print(sorted((set(r)))[int(input())-1])
Problem p03359 (python)

Fixed submission:
a,b=input().split();print(a if b>=a else int(a)-1)

Buggy submission (verdict: Runtime Error):
a,b=input().split();print(a if a=>b else int(a)-1)
Problem p03612 (python)

Fixed submission:
N = int(input())
p = list(map(int,input().split()))
ret = 0
flag = 0
for i in range(len(p)):
  if i + 1 == p[i]:
    if flag == 0:
      ret += 1
      if i < len(p)-1 and p[i+1] == i+2:
        flag = 1
    else:
      flag = 0
print(ret)

Buggy submission (verdict: Runtime Error):
N = int(input())
p = list(map(int,input().split()))
ret = 0
flag = 0
for i in range(len(p)):
  if i + 1 == p[i]:
    if flag == 0:
      ret += 1
      if p[i+1] == i+2:
        flag = 1
    else:
      flag = 0
print(ret)
Problem p03623 (python)

Fixed submission:
import math
x,a,b = list(map(int, input().split()))
print('A' if math.fabs(x-a) < math.fabs(x-b) else 'B')

Buggy submission (verdict: Runtime Error):
print(delta x: A if x[0]>x[1] else B, list(map(int,input().split())))
Problem p03713 (python)

Fixed submission:
h,w = sorted(list(map(int,input().split())))
if h % 3 == 0 or w % 3 == 0:
  ret = 0
else:
  c1 = ((w//3+1)*h)-((w-1-w//3)*(h//2))
  c2 = ((w-w//3)*(h-h//2))-(w//3*h)
  c3 = h
  c4 = ((h//3+1)*w)-((h-1-h//3)*(w//2))
  c5 = ((h-h//3)*(w-w//2))-(h//3*w)
  ret = min(c1,c2,c3,c4,c5)
print(ret)

Buggy submission (verdict: Runtime Error):
h,w = sorted(list(map(int,input().split())))
if h % 3 == 0 or w % 3 == 0:
  ret = 0
else:
  c1 = ((w//3+1)*h)-((w-1-w//3)*(h//2)
  c2 = ((w-w//3)*(h-h//2))-(w//3*h)
  c3 = ((w-w//3)*(h-h//2))-((w-w//3)*(h//2))
  ret = min(c1,c2,c3)
print(ret)
Problem p03719 (python)

Fixed submission:
print('Yes') if list(map(lambda a: a[0]<=a[2] and  a[2] <= a[1], [list(map(int,input().split()))]))[0] else print('No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
l = [0]*n
for i in range(0,m):
  for j in list(map(int,input().split())):
    l[j-1]+=1
for i in range(0,n):
  print(l[i])
Problem p03943 (python)

Fixed submission:
print((lambda x:"Yes" if max(x)*2==sum(x) else "No")(list(map(int,input().split()))))

Buggy submission (verdict: Runtime Error):
input()
A=list(map(int,input().split()))
d,c,s=0,0,A[0]
for x in A[1:]:
 if x-s<d:
  d,c=x-s,c
 elif x-s==d:
  c+=1
 s=min(s,x)
print(c)