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

Fixed submission:
a,b,c=(int(i) for i in input().split())
t=sorted([a,b,c])
print(int(t[0]*t[1]/2))

Buggy submission (verdict: Runtime Error):
a,b,c=(int(i) for i in input().split())
t=[a,b,c].sort()
print(t[0]*t[1]/2)
Problem p03149 (python)

Fixed submission:
A,B,C,D=(int(i) for i in input().split())
if {A,B,C,D}=={1,9,7,4}:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,C,D=(int(i) for i in input().split())
if {A,B,C,D}=={1,9,7,4}:
    print("Yes")
elif:
    print("No")
Problem p03150 (python)

Fixed submission:
wlist=[ i for i in input()]
klist=["k","e","y","e","n","c","e"]
a=[]
for i in range(len(wlist)-1):
    for j in range(i+1,len(wlist)):
        if wlist[0:i+1]+wlist[j:]==klist:
                a.append(1)
        else:
                a.append(0)
                
if 1 in a:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
wlist=[ i for i in input()]
klist=["k","e","y","e","n","c","e"]
a=0
b=0
while b<=6:
    if wlist[a]==klist[b]:
        a+=1
        b+=1
    else:
        a+=1
if b==7:
    print("YES")
else:
    print("NO")
Problem p03151 (python)

Fixed submission:
N=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
count=0
if sum(A)<sum(B):
    print(-1)
else:
    dif=[A[i]-B[i] for i in range(N)]
    if min(dif)>=0:
        print(0)
    else:
        difsort=sorted(dif)
        plist=[i for i in difsort if i>=0][::-1]
        mlist=[i for i in difsort if i<0]
        mnum=len(mlist)
        msum=sum(mlist)
        for i in range(len(plist)):
            if msum>=0:
                break
            msum+=plist[i]
            count+=1
            
        
        print(count+mnum)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
count=0
if sum(A)<sum(B):
    print(-1)
else:
    dif=[A[i]-B[i] for i in range(N)]
    if min(dif)>=0:
        print(0)
    else:
        difsort=sorted(dif)
        pluslist=[i for i in difsort if i>=0][::-1]
        minlist=[i for i in difsort if i<0]
        minum=len(minlist)
        absum=abs(sum(minlist))
        sumlist=[sum(pluslist[0:i+1]) for i in range(len(pluslist)-1)]
        while sumlist[count]<absum:
            count+=1
        
        print(count+1+minum)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
count=0
if sum(A)<sum(B):
    print(-1)
else:
    dif=[A[i]-B[i] for i in range(N)]
    if min(dif)>=0:
        print(0)
    else:
        difsort=sorted(dif)
        pluslist=[i for i in difsort if i>=0][::-1]
        minlist=[i for i in difsort if i<0]
        minum=len(minlist)
        absum=abs(sum(minlist))
        sumlist=[sum(maxsort[0:i+1]) for i in range(len(pluslist)-1)]
        while sumlist[count]<absum:
            count+=1
        
        print(count+1+minum)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
count=0
if sum(A)<sum(B):
    print(-1)
else:
    dif=[A[i]-B[i] for i in range(N)]
    if min(dif)>=0:
        print(0)
    else:
        difsort=sorted(dif)
        pluslist=[i for i in difsort if i>=0]
        zero=difsort.index(pluslist[0])
        minum=len(difsort[:zero])
        maxsort=difsort[::-1]
        absum=abs(sum(difsort[:zero]))
        sumlist=[sum(maxsort[0:i+1]) for i in range(len(pluslist)-1)]
        while sumlist[count]<absum:
            count+=1
        
        print(count+1+minum)
Problem p03200 (python)

Fixed submission:
S=input()[::-1]
ans,tmp=0,0
for i in S:
  if i=='W':
    tmp+=1
  else:
    ans+=tmp
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()[::-1]
ans,tmp=0,0
for i in S:
  if i=='W'
    tmp+=1
  else:
    ans+=tmp
print(ans)

Buggy submission (verdict: Runtime Error):
S=list(input())
a=0
for i in range(len(S):
  if S[i]=='W':
    a+=L[:i].count('B')
print(a)
Problem p03206 (python)

Fixed submission:
D=input()
if D=='25':
  print('Christmas')
elif D=='24':
  print('Christmas Eve')
elif D=='23':
  print( 'Christmas Eve Eve')
elif D=='22':
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
N,K=(int(i) for i in input().split())
hlist=[int(input()) for l in range(N)]
hlist.sort()
for j in range(N-K+2):
    dif=[hlist[j+k]-hlist[j]]
print(min(dif))

Buggy submission (verdict: Runtime Error):
N=int(input())
price=[int(input()) for i in range(N)]
price.sort(reverse=True)
price[0]=price[0]//2
sum(price)

Buggy submission (verdict: Runtime Error):
N=int(input())
price=[]
for i in range(N):
    price.append(int(input()))
price.sort(reverse=True)
price[0]=price[0]//2
sum(price)
Problem p03220 (python)

Fixed submission:
N=int(input())
T,A=(int(i) for i in input().split())
Hlist=[int(i) for i in input().split()]
Temp=[T-0.006*Hlist[i] for i in range(N)]
dif=[abs(A-Temp[j]) for j in range (N)]
print(dif.index(min(dif))+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=(int(i) for i in input().split())
Temp=[T-0.006*int(input()) for i in range(N)]
dif=[abs(A-Temp[j]) for j in range (N)]
print(dif.index(min(dif))+1)
Problem p03231 (python)

Fixed submission:
from fractions import gcd
N,M=(int(i) for i in input().split())
S=input()
T=input()
gcd_NM=gcd(N,M)
lcm_NM=(N*M//gcd_NM)
A=True
for i in range(gcd_NM):
  if S[(N//gcd_NM)*i]!=T[(M//gcd_NM)*i]:
    A=False 
    break
if A:
  print(lcm_NM)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
N.M=(int(i) for i in input.split())
S=input()
T=input()
gcd_NM=gcd(N,M)
lcm_NM=(N*M//gcd_NM)
A=True
for i in range(gcd_NM):
  if S[(N//gcd_NM)*i]!=T[(M//gcd_NM)*i]:
    A=False 
    break
if A:
  print(lcm_NM)
else:
  print(-1)
Problem p03251 (python)

Fixed submission:
N,M,X,Y=(int(i) for i in input().split())
xlist=[int(i) for i in input().split()]
ylist=[int(i)for i in input().split()]
xmax=max(xlist)
ymin=min(ylist)
if xmax<ymin:
  if xmax<Y and X<ymin:
    print('No War')
  else:
    print('War')
else:
  print('War')

Buggy submission (verdict: Runtime Error):
N,M,X,Y=(int(i) for i in input().split())
xlist=[].append(int(input()) for i in range(N))
ylist=[].append(int(input()) for i in range(M))
xmax=max(xlist)
ymin=min(ylist)
if xmax<ymin:
  if xmax<Y and X<ymin:
    print('No War')
  else:
    print('War')
else:
  print('War')

Buggy submission (verdict: Runtime Error):
N,M,X,Y=(int(i) for i in input().split())
xlist=[int(input()) for i in range(N)]
ylist=[int(input()) for i in range(M)]
xmax=max(xlist)
ymin=min(ylist)
if xmax<ymin:
  if xmax<Y and X<ymin:
    print('No War')
  else:
    print('War')
else:
  print('War')
Problem p03261 (python)

Fixed submission:
n=int(input())
L=[]
a=True
for i in range(n):
  L.append(input())
if len(L)!=len(set(L)):
  print('No')
else:
  for i in range(1,len(L)):
    if L[i][0]==L[i-1][-1]:
      continue
    else:
      a=False
  if a is True:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
L=[]
a=True
for i in range(n):
  L.append(input())
if len(L)!=len(set(L)):
  print('No')
else:
  for i in range(1,len(L)):
    if L[i][0]==L[i-1][-1]:
      continue
    else:
      a=False
  if a is True:
    print('Yes')
  else:
    print('No')
Problem p03264 (python)

Fixed submission:
K=int(input())
if K%2==0:
  print((K//2)**2)
else:
  print(K//2*(K//2+1))

Buggy submission (verdict: Runtime Error):
K=int(input())
if K%2==0:
  print((L//2)**2)
else:
  print(L//2*(L//2+1))
Problem p03292 (python)

Fixed submission:
L=[int(i) for i in input().split()]
A=abs(L[0]-L[1])
B=abs(L[1]-L[2])
C=abs(L[2]-L[0])
S=[A+B,A+C,B+C]
print(min(S))

Buggy submission (verdict: Runtime Error):
N=int(input())
import fractions 
print(2*N//fractions.gcd(2,N))
Problem p03308 (python)

Fixed submission:
N=int(input())
A=[int(i) for i in input().split()]
A.sort()
print(A[-1]-A[0])

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input()]
maxv=A[0]
minv=A[0]
for i in range(N):
  maxv=max(maxv,A[i])
  minv=min(minv,A[i])
print(maxv-minv)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input()]
maxv=A[0]
minv=A[1]-A[0]
for i in range(N):
  maxv=max(maxv,abs(A[i]-minv))
  minv=min(minv,A[i])
print(maxv)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(i) for i in input()]
maxv=A[0]
minv=A[1]-A[0]
for i in range(N):
  maxv=max(maxv,A[i]-minv)
  minv=min(minv,A[i])
print(maxv)
Problem p03338 (python)

Fixed submission:
N=int(input())
S=input()
L=[]
for i in range(0,N):
  L1=list(S[0:i]);L2=list(S[i:N])
  L.append(len(list(set(L1)&set(L2))))
print(max(L))

Buggy submission (verdict: Runtime Error):
X=int(input())
i=2
L=[]
import math
while math.floor(X**(1/i))!=1:
    L.append(math.floor(X**(1/i))**2)
    i+=1
print(max(L))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
L=[]
len_s=len(S)
for i in range(2,len_s-1):
  L1=list(S[1:i]);L2=list(S[i:len_s])
  L.append(len(list(set(L1)&set(L2))))
print(max(L))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
L=[]
len_s=len(S)
for i in range(2,len_s):
  L1=list(S[1:i]);L2=list(S[i:len_s])
  L.append(len(list(set(L1)&set(L2))))
print(max(L))
Problem p03352 (python)

Fixed submission:
X=int(input())
L=[1]
for i in range(2,X+1):
  j=2
  while i**j<=X:
    L.append(i**j)
    j+=1
print(max(L))

Buggy submission (verdict: Runtime Error):
X=int(input())
i=2
L=[]
import math
while math.floor(X**(1/i))!=1:
    L.append(math.floor(X**(1/i))**i)
    i+=1
print(max(L))

Buggy submission (verdict: Runtime Error):
X=int(input())
i=2
L=[]
import math
while math.floor(X**(1/i))!=1:
    L.append(math.floor(X**(1/i))**2)
    i+=1
print(max(L))
Problem p03370 (python)

Fixed submission:
N,X=(int(i) for i in input().split())
L=[int(input()) for i in range(N)]
L.sort()
a=sum(L)
print(N+(X-a)//L[0])

Buggy submission (verdict: Runtime Error):
A,B,C,X,Y=(int(i) for i in input().split())
 
if A+B<2*C:
  print(A*X+B*Y)
  
elif min(X,Y)<=2*C:
  if X>Y:
    print((X-Y)*A+2*Y*C)
  else:
    print((Y-X)*B+2*X*C)
elif A<=B:
  if X>Y:
    print(2*C*Y+(X-Y)*A)
  else:
    orint(2*C*Y)
else:
  if X<Y:
    print(2*C*X+(Y-X)*B)
  else:
    print(2*C*X)
  
  for i in range(print(2*C*max(X,Y))
Problem p03378 (python)

Fixed submission:
N,M,X=(int(i) for i in input().split())
L=[int(i) for i in input().split()]
a=0
b=0
for i in range(M):
  if L[i]<X:
    a+=1
  else:
    b+=1
print(min(a,b))

Buggy submission (verdict: Runtime Error):
N=int(input())
L=[int(i) for i in input().split()]
L1=sorted(L)
a=L1[N//2]
b=L1[N//2-1]
for i in range(N):
  if L[i]<a:
    print(a)
  else:
    print(b)

Buggy submission (verdict: Runtime Error):
N,M,X=(int(i) for i in input().split())
L=[int(input()) for i in range(M)]
a=0
b=0
for i in range(M):
  if L[i]<X:
    a+=1
  else:
    b+=1
print(min(a,b))
Problem p03386 (python)

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

Buggy submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K])&set(L[a-K:a]))[:]
  for i in range(len(S)):
    print(S[i])
Problem p03407 (python)

Fixed submission:
a,b,c=(int(i) for i in input().split())
if a+b>=c:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
def counting (l,s):
  for i in range(len(l)):
    A.append(l.count(l[i])-s.count(l[i]))
N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
counting(L,S)
print(max(A))
Problem p03408 (python)

Fixed submission:
N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
for i in range(N):
  A.append(L.count(L[i])-S.count(L[i]))
 
print(max(A))

Buggy submission (verdict: Runtime Error):

N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
for i in range(N):
  A.append(L.count(L[i])-S.count(S[i]))

print(max(A))
Problem p03423 (python)

Fixed submission:
N=int(input())
print(N//3)

Buggy submission (verdict: Runtime Error):
N-int(input())
print(N//3)
Problem p03457 (python)

Fixed submission:
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  if (t-t0-minT)>=0 and (t-t0-minT)%2==0:
    return True
  else:
    return False
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
for i in range(n):
  t,x,y=lst[i]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    ans=True
  else:
    ans=False
    break
if ans:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n-1:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    t,x,y=lst[num+1]
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    t,x,y=lst[num+1]
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')
Problem p03473 (python)

Fixed submission:
n=int(input())
a=24-n
print(24+a)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
S=input()
ass=True
for i in range(len(S)):
  if i==A:
    if S[i]!='-':
      ass=False
      break
  else:
    if S[i]=='-':
      ass=False
      break
if ass:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
S=input()
ass=True
for i in range(len(S)):
  if i==A:
    if S[i]!='-':
      ass=False
      break
  else:
    if S[i]=='-':
      ass=False
      break
if ass:
  print('Yes')
else:
  print('No')
Problem p03494 (python)

Fixed submission:
n=int(input())
lst=[int(i) for i in input().split()]
ans=[0]*n
for i in range(n):
  while lst[i]%2==0:
    lst[i]=lst[i]//2
    ans[i]+=1
print(min(ans))

Buggy submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
for i in range(n):
  lst[i]=lst[i]//2
print(min(ans))
Problem p03548 (python)

Fixed submission:
import math
a,b,c=map(int,input().split())
a-=c
print(math.floor(a/(b+c)))

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input(),split())
a-=c
print(math.floor(a/(b+c))
Problem p03574 (python)

Fixed submission:
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if l[i][j]=='.':
      count=0
      for k in pointx:
        for m in pointy:
          if l[i+k][j+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if l[i][j]=='.':
      count=0
      for k in pointx:
        for m in pointy:
          if l[i+k][i+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    count=0
    if l[i][j]=='.':
      for k in pointx:
        for m in pointy:
          if l[i+k][i+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))
Problem p03606 (python)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
  r,l=(int(i) for i in input().split())
  ans+=l-r+1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
  r,l=int(i) for i in input().split()
  ans+=l-r+1
print(ans)
Problem p03624 (python)

Fixed submission:
l=[chr(i) for i in range(97,97+26)]
s=list(input())
a=set(l)-set(s)
a=list(a)
a.sort()
if len(a)>0:
  print(a[0])
else:
  print('None')

Buggy submission (verdict: Runtime Error):
l=[chr(i) for i in range(97,97+26)]
s=list(input())
a=set(l)-set(s)
a=list(a)
a.sort()
print(a[0])
Problem p03625 (python)

Fixed submission:
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            num+=2
            break
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
import math
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            break
        elif num==1:
            ans*=lst[i]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
num=0
d=0
ans=1
A=False
while d<n:
  if l[d]==l[d+1]:
    ans*=l[d]
    num+=1
    i
    d=d+2
  if num==2:
    A=True
    break
if A:
  print(ans)
else:
  print(0)
Problem p03657 (python)

Fixed submission:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')

Buggy submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e10
for i in range(N):
  ans=min(ans,abs(res[i]-(res[-1]-res[i])))
print(ans)
Problem p03658 (python)

Fixed submission:
n,k=map(int,input().split())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
print(sum(l[:k]))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k]))

Buggy submission (verdict: Runtime Error):
n,k=map(inr,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k]))
Problem p03659 (python)

Fixed submission:
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e20
for i in range(N-1):
  ans=min(ans,abs(res[i]-(res[-1]-res[i])))
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e10
for i in range(N):
  ans=min(ans,abs(res[i]-(res[-1]-res[i]))
print(ans)
Problem p03679 (python)

Fixed submission:
x,a,b=map(int,input().split())
if a>=b:
    print('delicious')
elif (b-a)<=x:
    print('safe')
else:
    print('dangerous')

Buggy submission (verdict: Runtime Error):
x,a,b=map(int,input()/split())
if b>=a:
    print('delicious')
elif a-b<=x:
    print('safe')
else:
    print('dangerous')
Problem p03730 (python)

Fixed submission:
a,b,c=map(int,input().split())
d=a%b
if d==0:
    if c==0:
        A=True
    else:
        A=False
else:
    for i in range(1,max(a,b)):
        if (i*d)%b==c:
            A=True
            break
        else:
            A=False
if A:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=a%b
e=a//d+1
for i in range(e):
    if (i*d)%b==c:
        A=True
        break
    else:
        A=False
if A:
    print('YES')
else:
    print('NO')
Problem p03796 (python)

Fixed submission:
mod=10**9+7
n=int(input())
ans=1
for i in range(1,n+1):
    ans=(ans*i)%mod
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=m//2
if n>a:
    print(a)
else:
    print((n+a)//2)
Problem p02999 (python)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy submission (verdict: Runtime Error):
X = int(input(7))
A = int(input(4))
 
if X < A:
 print(0)
else:
 print(10)

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

if X < A:
 print(0)
else:
 print(10)

Buggy submission (verdict: Runtime Error):
3 5
 
if X < A:
 print(0)
else:
 print(10)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
X = input()
A = input()
 
if X < A:
 print(0)
else:
 print(10)

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

if X < A:
　print('0')
else:
　print('10')

Buggy submission (verdict: Runtime Error):
X = input()
A = input()

if X < A:
　print('0')
else:
　print('10')

Buggy submission (verdict: Runtime Error):
if X < A:
　print('0')
else:
　print('10')

Buggy submission (verdict: Runtime Error):
if X < A:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
if X < A:
    print('0')
else:
    print('10')

Buggy submission (verdict: Runtime Error):
X = input()
A = input()

if X < A:
    print('0')
else:
    print('10')
Problem p02999 (python)

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)

Buggy submission (verdict: Runtime Error):
w,h,x,y=map(int,input().split())
if w%2==0 and h%2==0:
    print(x*h,1) 
elif w%2==0:
    print(x*h,0)
elif h%2==0:
    print(y*w,0)
elif w%2!=0 and h%2!=0:
    print(w*h/2,0)

Buggy submission (verdict: Runtime Error):
w,h,x,y=map(int,input().split())
if w%x==0 and h%y==0:
    print(x*h) 
    print(1)
elif w%x==0:
    print(x*h)
    print(0)
elif w%x!=0:
    print(y*w)
    print(0)
else:
    print(w*h/2)
    print(0)