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

Fixed submission:
import collections
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
points=['No' for i in range(n)]
c = collections.Counter(a)

zone=k-q


for v in c:
    
    if zone+c.get(v)>=1:
        points[v-1]='Yes'
if zone>=1:
    for h in points:
        print('Yes')
else:
    for h in points:
        print(h)

Buggy submission (verdict: Runtime Error):
import collections
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
points=['No' for i in range(n)]
c = collections.Counter(a)

zone=k-q

if zone<1:
    for v in c.values():
        if abs(zone)+1<=v:
            points[v-1]='Yes'
for h in points:
  print(h)

Buggy submission (verdict: Runtime Error):
import collections
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
points=['No' for i in range(n)]
c = collections.Counter(a)

zone=k-q

if zone<1:
    for v in c.values():
        if abs(zone)+1=<v:
            points[v-1]='Yes'
        
    
    
    
        
    

print(points)
Problem p02927 (python)

Fixed submission:
m,d=map(int,input().split())
count=0

for i in range(1,m+1):
    for j in range(22,d+1):
        d1,d2=map(int,str(j))
        if i==(d1*d2) and d2>=2:
            count+=1
            
print(count)

Buggy submission (verdict: Runtime Error):
def count_inversion(sequence):
    return sum(sum(m<n for m in sequence[i+1:]) for i,n in enumerate(sequence))
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(k-1):
    a+=a

 
 
print(count_inversion(a)%100000007)
Problem p02958 (python)

Fixed submission:
n = int(input())
p=list(map(int,input().split()))
z=0
for i in range(n):
    if p[i]!=i+1:
        z+=1
if z>2:print("NO")
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
n = int(input())
p=list(map(int,input().split()))
z=0
for i in range(n):
    if p[i]!=i+1:
        z+=1
if z>2:print(NO)
else:
    print(YES)
Problem p03308 (python)

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

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

Fixed submission:
n,maxg=map(int,input().split())
lista =[int(input()) for i in range(n)]
count=n
nokori=maxg-sum(lista)

while nokori-min(lista)>=0:
    nokori=nokori-min(lista)
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n,maxg=map(int,input().split())
lista =[int(input()) for i in range(n)]
count=count+n
nokori=maxg-sum(lista)
print(count)
while nokori-min(lista)>=0:
    nokori=nokori-min(lista)
    count+=1
print(count)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
if a*b==0 :
  print("even")
elese:print("odd")
Problem p03486 (python)

Fixed submission:
s=input()
t=input()
c=""
d=""
lista=list()
sa=sorted(s)
ta=sorted(t,reverse=True)
for i in sa:
    c=c+i
for x in ta:
    d=d+x
lista.append(c)
lista.append(d)
if s==t:
    print("No")
elif lista==sorted(lista):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s=sorted(input())
t=sorted(input(),reverse=True)

lista=list()

for i in s:
    c=c+i
for x in t:
    d=d+x
lista.append(c)
lista.append(d)
if s==t:
    print("No")
elif lista==sorted(lista):
    print("Yes")
else:
    print("No")
Problem p03487 (python)

Fixed submission:
import collections
n=int(input())
c=list(map(int,input().split()))
c = collections.Counter(c)
count=0
for x in c:
    if x==c[x]:
        continue
    elif x>c[x]:
        count+=c[x]
    else:
        count=count+(c[x]-x)
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
c=list(map(int,input().split()))
c = collections.Counter(c)
count=0
for x in c:
    if x==c[x]:
        continue
    elif x>c[x]:
        count+=c[x]
    else:
        count=count+(c[x]-x)
print(count)
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]

c=[flatten for inner in road for flatten in inner]

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

Buggy submission (verdict: Runtime Error):
import numpy as np

n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
    print(ans[1][i])

Buggy submission (verdict: Runtime Error):
import numpy as np

n,m=map(int,input().split())
road=[list(input().split()) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
    print(ans[1][i])

Buggy submission (verdict: Runtime Error):
import numpy as np

n,m=map(int,input().split())
road=[list(input().split()) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
    print(ans[1][i])
Problem p03737 (python)

Fixed submission:
a,b,c=input().split()
ans=a[0]+b[0]+c[0]
print(ans.upper())

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

goukei=0
count=0

for i in range(n):
    number=lista[i]+goukei
    if i%2==0:
        if number>=0:
            count=count+number+1
            goukei=-1
        else:
            goukei=number
    else:
        if number<=0:
            count=count+abs(number)+1
            goukei=1
        else:
            goukei=number

count1=count

goukei=0
count=0

for i in range(n):
    number=lista[i]+goukei
    if i%2==1:
        if number>=0:
            count=count+number+1
            goukei=-1
        else:
            goukei=number
    else:
        if number<=0:
            count=count+abs(number)+1
            goukei=1
        else:
            goukei=number
print(min(count,count1))
Problem p04043 (python)

Fixed submission:
lista=list(map(int,input().split()))
lista.sort()
if lista==[5,5,7]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
lista=list(map(int,input().split()))
lista.sort()
if lista==[5,5,7]:
    print("YES")
else:
    ptinr("NO")
Problem p02924 (python)

Fixed submission:
import numpy as np

a = int(input())
answer = a*(a-1)//2

print(int(answer))

Buggy submission (verdict: Runtime Error):
import numpy as np

a = int(input())
h = np.array(list(range(1,a+1)))
h2 = h[::-1]
temp = int(0)
index_val = int(0)
max_mod = int(0)
sum_mod = int(0)

for value in h2:
  for index in range(len(h)):
    if h[index]!=0:
      temp = value % h[index]
      if temp > max_mod:
        max_mod = temp
        index_val = index
  sum_mod += max_mod
  max_mod = 0
  temp = 0
  np.put(h,index_val,0)

if a==1:
  print(0)
else:
  print(sum_mod+1)

Buggy submission (verdict: Runtime Error):
import numpy as np

a = int(input())
h = np.array(list(range(1,a+1)))
h2 = h[::-1]
temp = int(0)
index_val = int(0)
max_mod = int(0)
sum_mod = int(0)

for value in h2:
  for index in range(len(h)):
    temp = value % h[index]
    if temp > max_mod:
      max_mod = temp
      index_val = index
  sum_mod += max_mod
  max_mod = 0
  np.put(h,index_val,0)

if a!=1:
  print(sum_mod+1)
else:
  print(0)
Problem p02946 (python)

Fixed submission:
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)

if x.size > 1:
  print(" ".join(list(map(str,x))))
else:
  print(x)

Buggy submission (verdict: Runtime Error):
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)
  
print(" ".join(list(map(str,x))))
Problem p02952 (python)

Fixed submission:
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if len(n)==1:
    print(int(n))
  else:
    print(int(n)-int(zeronine))

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

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if n=="0":
    print(1)
  else:
    print(int(n)-int(zeronine))

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

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  print(int(n)-int(zeronine))
Problem p02981 (python)

Fixed submission:
a = [int(i) for i in input().split()]

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

else:
  return a[2]

Buggy submission (verdict: Runtime Error):
a = [int(i) for i in range input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Buggy submission (verdict: Runtime Error):
a = input().split()

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Buggy submission (verdict: Runtime Error):
a = input().split()

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Buggy submission (verdict: Runtime Error):
a = list( input().split())

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

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

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Buggy submission (verdict: Runtime Error):
i = list( map( int, input().split()))
if i[0]*i[1]<=i[2]:
  return i[0]*i[1]
else:
  return i[2]
Problem p02988 (python)

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

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = int( input())
a = list( map(int(input().split())))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = int( input())
a = list( int(input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list (int(input()))

cnt = 0
for i in range (1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i-1]>a[i]>a[i+1]):
    cnt += 1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0

if (len(a) = 3) and (a[1] = 2):
  cnt = 1

else:
  for i in range ( 1, len(a)-1):
    if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
      cnt += 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if (len(a) = 3) and (a[1] = 2):
  cnt = 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if len(a) = 3 and a[1] = 2:
    cnt = 1
    
print (cnt)

Buggy submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if len(a) = 3:
  if a[1] = 2:
    cnt = 1
    
print (cnt)
Problem p03001 (python)

Fixed submission:
W, H, x, y = map( int, input().split())

if not ( x == W/2 and y == H/2):
  print(W*H/2, 0)
  
else:
  print(W*H/2,1)

Buggy submission (verdict: Runtime Error):
W, H, x, y = map( int, input().split())
print(WH/2, 1)
Problem p03067 (python)

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

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

if l[0] < l[2] && l[1] < l[2]:
 print('No')
elif l[2] < l[0] && l[2] < l[0]:
 print('No')
else:
 print('Yes')
Problem p02885 (python)

Fixed submission:
a,b=map(int,input().split())
c=a-2*b
if c>0:
    print(c)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=a-2*b
if c>o:
    print(c)
else:
    print(0)
Problem p02909 (python)

Fixed submission:
s=str(input())
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainy')
else:
    print('Sunny')

Buggy submission (verdict: Runtime Error):
s=str(input())
if s='Sunny':
    print('Cloudy')
elif s='Cloudy':
    print('Rainy')
else:
    print('Sunny')
Problem p02923 (python)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
H=[]
for i in range(n-1):
    if h[i+1] <= h[i]:
        H.append('a')
    else:
        H.append('b')
s=''.join(H)
t=s.split('b')
ans=max(len(u) for u in t)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
ans=[]
for i in range(n-1):
    ans_i=0
    for j in range(i+1,n):
        while h[j] <= h[i]:
            ans_i+=1
        ans.append(ans_i)
print(max(ans))
Problem p02957 (python)

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

if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
K =nA + B

if K % 2 == 0:
    print(K)
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
K =nA + B

if K % 2 == 0:
    print(K)
else:
    print("IMPOSSIBLE")
Problem p02988 (python)

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

num = 0
for i in range(n-2):
    list_i = P[i:i+3]
    if list_i[1] == sorted(list_i)[-2]:
        num += 1
    else:
        num += 0

print(num)

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

num = 0
for i in range(n):
    list_i = P[i:i+3]
    if list_i[1] == sorted(list_i)[-2]:
        num += 1
    else:
        num += 0

print(num)
Problem p02993 (python)

Fixed submission:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")

Buggy submission (verdict: Runtime Error):
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

if num == 0:
    print("Good")
else:
    print("Bad")

Buggy submission (verdict: Runtime Error):
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

if num == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        print("Bad")
        sys.exit()
    else:
        num += 1
        if num == 3:
            print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
S = int(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        print("Bad")
        sys.exit()
    else:
        num += 1
        if num == 3:
            print("Yes")
Problem p03076 (python)

Fixed submission:
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
if ll == []:
    ans += 10
else:
    ans += min(ll)
print(ans)

Buggy submission (verdict: Runtime Error):
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
ans += min(ll)
print(ans)
Problem p03125 (python)

Fixed submission:
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Buggy submission (verdict: Runtime Error):
a,b = int(input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(inout())
if n == 1:
    print('Hello World')
else:
    a = int(inout())
    b = int(inout())
    print(a+b)
Problem p03261 (python)

Fixed submission:
n=int(input())
l=[str(input()) for i in range(n)]
ans = 'Yes'
for i in range(1,n):
    if l[i][0] != l[i-1][-1]:
        ans = 'No'
        break
if len(set(l)) != n:
  ans = 'No'
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[str(input()) for i in range(n)]
ans = 0
for i in range(n):
    if list(l[i])[-1] == list(l[i+1])[0] and l.count(l[i]) == 1:
        ans += 1
    else:
        ans += 0
print('Yes' if ans==n else'N0')
Problem p02887 (python)

Fixed submission:
n = int(input())
s = input()
p = list(s)
i=1
while len(p)>i:  
    if p[i-1]==p[i]:
        del p[i]
    else:
        i+=1

print(len(p))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
p = list(s)
i=1
f=0
while f==0:  
    if p[i-1]==p[i]:
        del p[i]
    else:
        i+=1
    if len(p)<=i:
        f=1

print(len(p))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
p = list(s)
i=1
f=0
while f==0:  
    if p[i-1]==p[i]:
        del p[i]
    else:
        i+=1
    if len(p)<=i:
        f=1

print(len(p))
Problem p02911 (python)

Fixed submission:
m = list(map(int,input().split()))
n = [0] * m[0]

for i in range(m[2]):
    n[int(input())-1] += 1
  
for i in range(m[0]):
    if n[i] - m[2] + m[1] > 0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

n = [m[1]] * m[2]

for i in range(m[2]):
    n = [i-1 for i in n]
    n[a[i]-1] +=1

for i in range(m[0]):
    if n[i]>0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

n = [m[1]] * m[2]
print(n)

for i in range(m[2]):
    n = [i-1 for i in n]
    n[a[i]-1] +=1

for i in range(m[0]):
    if n[i]>0:
        print('Yes')
    else:
        print('No')
Problem p02917 (python)

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

if n == 2:
    print(b[0]*2)
elif n==3:
    print(b[1]+min(b[0],b[1])*2)
else:
    co = [min(x , y) for (x, y) in zip(b[0:-1], b[1:])]
    print(sum(co)+b[-1]+b[0])

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int,input().split()))
c=0

if n == 1:
    print(b[0]*2+b[1])
elif n==2:
    print(b[-1]+min(b[0],b[1])*2)
else:    
    for i in range(n-2):
        c = c + min(b[i],b[i+1])
    print(c+b[-1])
Problem p03060 (python)

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

VC = 0
for i in range(N):
    if V[i]-C[i]>0:
        VC = VC + V[i]-C[i]
    else:
        VC = VC

print(VC)

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

VC = 0
for i in range(N):
    if V[i]-C[i]>0:
        VC = VC + V[i]-C[i]
    else:

print(VC)
Problem p03076 (python)

Fixed submission:
m=[int(input()) for i in range(5)]
k = []
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    
    
    t=m[i] - (m[i]//10)*10
    if t>0:
        k.append(t)
if len(k)==0:
    print(sum(j))
else:
    print(sum(j)-(10-min(k)))

Buggy submission (verdict: Runtime Error):
m=[int(input()) for i in range(5)]
k = []
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    t = m[i] - (m[i]//10)*10
    if t>0:
      k.append(t)
if min(k) == 0:
    print(sum(j))
else:
    print(sum(j)-(10-min(k)))

Buggy submission (verdict: Runtime Error):
m=[int(input()) for i in range(5)]
k=[]
j=[]
for i in range(5):
    j.append(-(-m[i]//10)*10)
    t = m[i] - (m[i]//10)*10
    if t>0:
      k.append(t)
    
print(sum(j)-(10-min(k)))
Problem p03102 (python)

Fixed submission:
n,m,c=map(int,input().split())
a=[]
for i in range(n+1):  
  a.append(list(map(int,input().split())) )
y=0
for i in range(n):
  x=0  
  for j in range(m):
    x+=a[i+1][j]*a[0][j]
  if x+c>0:
    y+=1
print(y)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
a = [list(map(int,input().split())) for i in range(m)]
y=0
for i in range(n):
  x=0  
  for j in range(m):
    x+=a[i+1][j]*a[0][j]
  if x+c>0:
    y+=1
print(y)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
a = [list(map(int,input().split())) for i in range(m)]
c=0
for i in range(n):
  x=0  
  for j in range(m):
    x=a[i+1][j]*a[0][j]
  if x+c>0:
    c+=1
print(c)
Problem p04044 (python)

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

s = [list(map(str,input().split())) for i in range(m[0])]
a=''
s.sort()
for i in range(m[0]):
  a=a+''.join(s[i]) 
print(a)

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

s = [list(map(str,input().split())) for i in range(m[0])]
a=''
s.sort()
for i in range(m[1]):
  a=a+''.join(s[i]) 
print(a)
Problem p02900 (python)

Fixed submission:
def gcd(a : int, b: int):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

a, b = map(int, input().split())
g = gcd(a, b)
ans = set([1])
for i in range(2, 1000000):
    while g % i == 0:
        g = g // i
        ans.add(i)
if g > 1:
    ans.add(g)

print(len(ans))

Buggy submission (verdict: Runtime Error):
from math import gcd

a, b = map(int, input().split())
g = gcd(a, b)
ans = set([1])
for i in range(2, 1000000):
    while g % i == 0:
        g = g // i
        ans.add(i)

print(len(ans))
Problem p02952 (python)

Fixed submission:
n = int(input())
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
    	count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
		count += 1
print(count)