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

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

if A < B:
  A_P = A + V * T
  B_P = B + W * T
  if A_P >= B_P:
    print("YES")
  else:
    print("NO")
else:
  A_P = A - V * T
  B_P = B - W * T
  if A_P <= B_P:
    print("YES")
  else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if A < B:
  A_P = A + V * T
  B_P = B + W * T
  if A_P >= B_P:
    print("YES")
  else:
    print("NO")
else A > B:
  A_P = A - V * T
  B_P = B - W * T
  if A_P <= B_P:
    print("YES")
  else:
    print("NO")
Problem p02647 (python)

Fixed submission:
def action(A, N):
  B = [0] * N
  for i, bright in enumerate(A):
    s = max(0, i - bright)
    B[s] += 1
    e = min(N, i + bright)
    if e < N - 1:
      B[e + 1] -= 1
  
  for i in range(N - 1):
    B[i + 1] += B[i]
  return B

def main():
  N, K = map(int, input().split())
  A = list(map(int, input().split()))

  for i in range(K):
    A = action(A, N)
    if (A[0] == N) & all(A):
      break
      
  print(*A, sep=" ")

if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):

def action(A, N):
  B = [0] * (N + 1)
  for i, bright in enumerate(A):
    s = max(0, i - bright)
    B[s] += 1
    e = min(N, i + bright)
    B[e + 1] -= 1
  
  for i in range(N):
    B[i + 1] += B[i]
  return B[:-1]

def main():
  N, K = map(int, input().split())
  A = list(map(int, input().split()))

  for i in range(K):
    A = action(A, N)
    if A[0] == N & all(A):
      break
      
  print(*A, sep=" ")

if __name__ == '__main__':
  main()
Problem p02691 (python)

Fixed submission:
N = int(input())
A = input().split()

pear = 0

i_result = {}
j_result = {}

for i in range(N):
  result = str(i + int(A[i]))
  if result in i_result:
    i_result[result] += 1
  else:
    i_result[result] = 1

for j in range(N):
  result = str(j - int(A[j]))
  if result in j_result:
    j_result[result] += 1
  else:
    j_result[result] = 1

for k in i_result.keys():
  if k in j_result:
    pear += (i_result[k] * j_result[k])
      
      
print(pear)

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

pear = 0

for i in range(N, 1, -1):
  for j in range(i):
    if int(A[i]) >= (i - j):
      break
    if (i - j) == (int(A[i]) + int(A[j])):
      pear += 1
      
print(pear)
Problem p02608 (python)

Fixed submission:
import sys
N = int(sys.stdin.readline())
if N < 6:
  x, y, z = 0, 0, 0
else:
  x = int((N / 6)**0.5)
  y = int(round(((((N -1)/3) - 1/9)**0.5 - 1/3)+ 0.5, 0))
  z = int((N - 5)**0.5 + 1)            
n = [0]*(N+1)
for i in range(1,x+1):
  for j in range(i,y+1):
    for k in range(j, z+1):
      p = int((i + j + k)**2 - i*(j + k) - j*k)
      if N < p:
        break
      if i == j:
        if j == k:
          n[p] += 1
        else:
          n[p] += 3
      else:
        if i == k:
          n[p] += 3
        else:
          if j == k:
            n[p] += 3
          else:
            n[p] += 6
for i in range(1,N+1):
  print(n[i])

Buggy submission (verdict: Runtime Error):
import sys
N = int(sys.stdin.readline())
x = int((N / 6)**0.5)
y = int((((N -1)/3) - 1/9)**0.5 - 1/3)
z = int((N - 5)**0.5 + 1)
for n in range(1,N+1):
  ans = 0
  for i in range(1,x+1):
    for j in range(i,y+1):
      if i % 2 == j % 2:
        d = 2
        if n % 2 == 0:
          c = 0
        else:
          c = 1
      else:
        d = 1
        if n % 2 == 0:
          c = 10000
        else:
          c = 0    
      for k in range(j + c, z+1, d):
        p = (i + j + k)**2 - i*(j + k) - j*k
        if n < p:
          break
        if n == p:
          if i == j:
            if j == k:
              ans += 1
            else:
              ans += 3
          else:
            if i == k:
              ans += 3
            else:
              if j == k:
                ans += 3
              else:
                ans += 6
  print(ans)

Buggy submission (verdict: Runtime Error):
import sys
N = int(sys.stdin.readline())
x = int((N / 6)**0.5)
y = int((N - 5)**0.5 + 1)
for n in range(1,N+1):
  ans = 0
  for i in range(1,x+1):
    for j in range(i,x+1):
      for k in range(j,y+1):
        if n == (i + j + k)**2 - i*(j + k) - j*k:
          if i == j:
            if j == k:
              ans += 1
            else:
              ans += 3
          else:
            if i == k:
              ans += 3
            else:
              if j == k:
                ans += 3
              else:
                ans += 6
  print(ans)
Problem p02687 (python)

Fixed submission:
s=input()

if(s=="ABC"):print("ARC")
if(s=="ARC"):print("ABC")

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

if(s=="ABC")print("ARC")
else if(s=="ARC")print("ABC")

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

if(s=="ABC")print("ARC")
else if("ARC")print("ABC")
Problem p02718 (python)

Fixed submission:
N,M =input().split()
A = list(map(int, input().split()))
A.sort(reverse=True)
ans="Yes"

th = sum(A)/(4*int(M))
for i in range(int(M)):
  if A[int(M)-1-i] < th:
    ans="No"
    break
print(ans)

Buggy submission (verdict: Runtime Error):
N,M =input().split()
A = [int(i) for i in input().split()]
A.sorted(reverse=True)
ans="Yes"
th = sum(A)/(4*M)
print(type(th))
for i in range(M):
  if A[M-1-i] < th:
    ans="No"
    break
print(ans)
Problem p02730 (python)

Fixed submission:
s = input()

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
    if(check(s)):
    	print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
     print('No')

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

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
    if(check(2)):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
     print('No')

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

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
    if(check(2)):
    	print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
     print('No')
Problem p03455 (python)

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

c = a*b

if c%2 ==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
n = int(input())
t=0
x=0
y=0
ans ="Yes"
for i in range(n):
  tt,xx,yy = map(int,input().split())
  dif = abs(x-xx)
  dif +=abs(y-yy)
  if dif>(tt-t) :
    ans = "No"
    break;
  t=tt
  x=xx
  y=yy
print(ans)
Problem p02690 (python)

Fixed submission:
X = int(input())

#A**5,B**5でとり得る可能性のある数をあらかじめリストで用意する

N = [i**5 for i in range(1000)]
 
#A,Bで別々の処理をするため、変数はi,jの２種を用意する


for i in range(1000):
	for j in range(1000):

#リストから２つの数を抽出し、Xになるか計算を繰り返す
#Xは正の整数であるため、Aが負になる可能性は除外

		if N[j] - N[i] == X:
			print(j, i)
			exit()

#Bが負の場合、符号が変わる可能性があるため、もう１パターン計算

		if N[j] + N[i] == X:
			print(j, -i)
			exit()

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

Ansermax = 0

if b < N :
    N = b
    
for x in range(N+1):

    Anser = 0

    Anser = int((a*x)//b)-a*int(x//b)
    
    if Ansermax < Anser:
        Ansermax = Anser
    
    if x//b >= 1:
     break

print(Ansermax)
Problem p02691 (python)

Fixed submission:
import collections
n=int(input())
A=list(map(int,input().split()))
B = [ i-A[i]    for i in range(n)]
C = [ i+A[i]    for i in range(n)]
b = collections.Counter(B)
c = collections.Counter(C)
ans =0
cnt = 0
 
for i in b.keys():
  ans +=c[i]*b[i]
     
print(ans)

Buggy submission (verdict: Runtime Error):
import collections
n=int(input())

A=list(map(int,input().split())))
B = [(A[0] + A[i] -i)   for i in range(n)]
b = collections.Counter(B)
ans =0
cnt = 0
for i in range(len(B)):
    
    ans += b[cnt]
    if i != 0:
        cnt += (B[i] - B[i-1] -1)

print(ans)
Problem p02783 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(-(-a//b))
Problem p02801 (python)

Fixed submission:
N = input()
A =[chr(i) for i in range(97, 97+26)]
for k in range(len(A)):
    if N==A[k]:
        print(A[k+1])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [input().split() for i in range(M)]
s1=list()
s2=list()
p=0
w=0
for i in range(M):
    if A[i][0] not in s2 and A[i][1]=="WA":
        s1 +=A[i][0]
    if A[i][0] not in s2 and A[i][1]=="AC":
        p+=1 
        s2 +=A[i][0]
        w += int(s1.count(A[i][0]))        
print(p,w)
Problem p02802 (python)

Fixed submission:
N,M = [int(x) for x in input().split()]
count = [0]*N
ac = 0
wa = 0
ireta = []
for i in range(M):
    a,b = input().split()
    a = int(a)
    if b == "AC" and count[a-1] == 0:
        count[a-1] = 1
        ac += 1
    elif count[a-1] == 0:
        ireta.append(a)
        wa += 1
for i in range(len(ireta)):
    if count[ireta[i]-1] == 0:
        wa -= 1
print(ac,wa)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
a = [0] * M
b = [0] * M
for i in range(M):
    a[i],b[i]= map(str, input().split())
s1=list()
s2=list()
p=0
w=0
for i in range(M) :
    if a[i] not in s2 and (b[i]=="WA"):
        s1 += a[i] 
    if a[i] not in s2 and (b[i]=="AC"):
        print(s2)
        p += 1 
        s2.append(a[i])
        w += int(s1.count(a[i]))
print(min(N,p),w)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [input().split() for i in range(M)]
s1=list()
s2=list()
p=0
w=0
for i in range(M):
    if A[i][0] not in s2 and A[i][1]=="WA":
        s1 +=A[i][0]
        print(s1)
    if A[i][0] not in s2 and A[i][1]=="AC":
        p+=1 
        s2 +=A[i][0]
        w += int(s1.count(A[i][0]))
        print(s1,s2)
print(p,w)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A=[] #appendのために宣言が必要
while True:
    try:
        A.append(list(map(int,input().split())))

    except:
        break;
s1=list()#ACがまだでWAの数
s2=list()#ACした問題
p=0
w=0
for i in range(M):
    if A[i][1]=="WA":
        s1.append(A[i][0])

    if A[i][0] not in s2 and A[i][1]=="AC":
        p+=1
        s2.append(A[i][0])
        w+=int(s1.count(A[i][0])

print(p,w)
Problem p02882 (python)

Fixed submission:
from decimal import * 
import math
a,b,x = map(int,input().split())
X = x/a
P = X /(a*b)
if P >= 0.5 :
    print(math.degrees(math.atan((2*b*(1-P)/a))))
else:
    print(math.degrees(math.atan((a*b**2/(2*x)))))

Buggy submission (verdict: Runtime Error):
import math
a,b,x = map(int,input().split())
P = X /(a*b)
if P >= 0.5:
    print(math.degrees(math.atan((2*b*(1-P)/a))))
else:
    print(math.degrees(math.atan((a*b)**3/(2*x**2))))
Problem p03160 (python)

Fixed submission:
N = int(input())
H = list(map(int,input().split()))
dp=[0]*N
dp[0]=0
dp[1]=abs(H[0]-H[1])
for i in range(1,int(N)-1,1):
    dp[i+1] +=min(dp[i]+abs(H[i]-H[i+1]),dp[i-1]+abs(H[i-1]-H[i+1]))
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N = input()
H = list(map(int,input().split()))
dp=[0 for i in range(H+1)]
dp[0]=0
dp[1]=abs(H[0-H[1]])
for i in range(2,N):
    dp[i+1] +=min(dp[i]+abs(H[i]-H[i+1]),dp[i-1]+abs(H[i-1]-H[i+1]))
    return dp[N]
print(dp[N])
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
print('Yes') if n%500<=a else print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
SA = sorted(A,reverse=True)
ALI =0
BOB=0
for i in range(0,N,2):
    ALI += int(SA[i])
for n in range(1,N,2):
    BOB += int(SA[n])
ans = ALI - BOB
print(ans)
Problem p03448 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if a*500+b*100+c*50==X:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if i*500+n*100+m*50==X:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for i in range(A):
    for n in range(B):
        for m in range(C):
        if i*500+n*100+m*50==X:
        count += 1
print(count)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a*b%2==0:
    print('Even')
elif a*b%2==1:
    print('Odd')
end

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a*b%2==0:
    print(Even)
elif a*b%2==1:
    print(Odd)
end

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x*y%2==0:
    print("Even")
elif x*y%2==1:
    print("Odd")
end

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x*y　%2==0:
    print("Even")
elif x*y%2==1:
    print("Odd")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
	if x*y%2==0:
    	print("Even")
    elif :
      print("Odd")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x*y%2==0:
    print("Even")
    elif :
      print("Odd")
end

Buggy submission (verdict: Runtime Error):
x,y = map(int,input.split())
if x*y % 2 == 0 :
    print("Even")
    else print("Odd")
end

Buggy submission (verdict: Runtime Error):
x,y = map(int,input.split())
if x*y%2==0
    print("Even")
    else print("Odd")
end
Problem p03470 (python)

Fixed submission:
n=int(input())
int_list=[input() for i in range(n)]
print(len(set(int_list)))

Buggy submission (verdict: Runtime Error):
n=int(input())
int_list=[input() for i in range(n)]
print(len(set(int_list())))
Problem p03471 (python)

Fixed submission:
N,Y = map(int,input().split())
for i in range(N+1):
    for n in range(N-i+1):
        if 10000*i+5000*n+1000*(N-i-n) == Y:
            print(i,n,N-i-n)
            break
    else:
        continue
    break
else:
    print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N,Y = map(int,input().split())
for i in range(int(N)):
	for n in range(int(N-i)):
		m = N-i-n
		if i*10000+n*5000+m*1000 ==Y:
			print(i,n,m)
        else:
	break
if 10000*i+5000*n+1000*m != Y:
	print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N,Y = map(int,input().split())
for a in range(N):
    for b in range(N):
        10000*a+5000*b+1000*(N-a-b) == Y
        print(a,b,N-a-b)
    	break
	break

Buggy submission (verdict: Runtime Error):
9 45000N,Y = map(int,input().split())
for a in range(N):
    for b in range(N):
        10000*a+5000*b+1000*(N-a-b) == Y
        print(a,b,N-a-b)
    	break
	break

Buggy submission (verdict: Runtime Error):
N = int(input())
Y = int(input())
for a in range(N):
    for b in range(N):
        10000*a+5000*b+1000*(N-a-b) == Y
        print(a,b,N-a-b)
    break
Problem p03478 (python)

Fixed submission:
x,y,z = map(int,input().split())
count = 0
for i in range(1,x+1) :
    LIST = [int(x) for x in list(str(i))]
    if y <=sum(LIST) <=z :
        count += i       
print(count)

Buggy submission (verdict: Runtime Error):
x,y,z = map(int,input().split())
count = 0
for i in range(1:x) 
    LIST = [int(x) for x in list(str(i))]
    if y <sum(LIST) <z :
        count +=1        
print(count)
Problem p03493 (python)

Fixed submission:
s=list(input())
count = 0
for i in range(3):
    if s[i] == '1':
        count = count + 1    
print(count)

Buggy submission (verdict: Runtime Error):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(input())
a = map(int,input().split())
ans = min(map(how_many_times_divisible, a))
 
print (ans)

Buggy submission (verdict: Runtime Error):
s=list(input())
count = 0
for i in range(2):
    if s[i] == 1 :
        count +=1    
print(count())

Buggy submission (verdict: Runtime Error):
s=list(str,input())
count = 0
for i in range(2):
    if s[i] == 1 :
        count = count+1    
print(count)

Buggy submission (verdict: Runtime Error):
s=list(str,input())
count = 0
for i in range(2):
    if s[i] == 1 :
        count +=1    
break
print(count())
Problem p03494 (python)

Fixed submission:
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(input())
a = map(int,input().split())
ans = min(map(how_many_times_divisible, a))
 
print (ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s=list(str,input())
count = 0
for s in range(10) 
    for i in range(n):
        if type(s[i]/2) ==True :
            s[i]=s[i]/2
            i = i+1
        count +=1
        elif type(s[i]/2) ==False:
        break
break
print(count)
Problem p03545 (python)

Fixed submission:
N = input()
n = [int(N[i]) for i in range(4)]  

def addd(lista,op):
    cnt = lista[0]


    tmp = [lista[0]]
    for i in range(len(op)):
        if op[i]==0:
            cnt+=lista[i+1]
            tmp.append("+")
            tmp.append(lista[i+1])
        else:
            cnt -=lista[i+1]
            tmp.append("-")
            tmp.append(lista[i+1])
    if cnt ==7:
        tmp.append("=7")
        return tmp
    else:
        return False

for i in range(2):
    for j in range(2):
        for k in range(2):
            ans = addd(n,[i,j,k])
            if ans != False:
                print("".join([str(n) for n in ans]))
                exit()

Buggy submission (verdict: Runtime Error):
N = input()
n = [int(N[i]) for i in range(4)]  


def addd(lista,op):
    cnt = lista[0]


    tmp = [lista[0]]
    for i in range(len(op)):
        if op[i]==0:
            cnt+=lista[i+1]
            tmp.append("+")
            tmp.append(lista[i+1])
        else:
            cnt -=lista[i+1]
            tmp.append("-")
            tmp.append(lista[i+1])
    if cnt ==7:
        tmp.append("=7")
        return tmp
    else:
        False

for i in range(2):
    for j in range(2):
        for k in range(2):
            ans = addd(n,[i,j,k])
            if ans != False:
                print("".join([str(n) for n in ans]))
                exit()
Problem p03760 (python)

Fixed submission:
o= input()
e= input()
P = ''

if len(o)==len(e):
    for i in range(len(o)):
        P += o[i]
        P += e[i]
else:
    for i in range(len(o)-1):
        P += o[i]
        P += e[i]
    P += o[len(o)-1]
print(P)

Buggy submission (verdict: Runtime Error):
atcoderbeginnercontest
atcoderregularcontest
Problem p03807 (python)

Fixed submission:
N = input()
A = input().split()
count=0
for i in range(int(N)):
  if int(A[i]) % 2==1:
    count+=1
if count%2==1:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N = input()
A = input().split()
count=0
for i in range(N):
  if A[i]%2==1:
    count+=1
if conut%2=1:
  print("NO")
else:
  print("YES")
Problem p03457 (python)

Fixed submission:
n = int(input())
# 初期位置
x_old, y_old, t_old = 0, 0, 0

for _ in range(n):
    # 都度読み込み
    t, x, y = map(int, input().split())
    d = (t - t_old) - abs(x - x_old) - abs(y - y_old)
    if d >= 0 and d % 2 == 0:
        x_old, y_old, t_old = x, y, t
    else:
        print('No')
        exit()

print('Yes')

Buggy submission (verdict: Runtime Error):
int(input())
# 初期位置
x_old, y_old, t_old = 0, 0, 0

for _ in range(n):
    # 都度読み込み
    t, x, y = map(int, input().split())
    d = (t - t_old) - abs(x - x_old) - abs(y - y_old)
    if d >= 0 and d % 2 == 0:
        x_old, y_old, t_old = x, y, t
    else:
        print('No')
        exit()

print('Yes')
Problem p02612 (python)

Fixed submission:
import math
def main():
    N = int(input().rstrip())
    use = math.ceil(N/1000)
    print(1000*use - N)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import math
def main():
    with open('in.csv', 'r') as r:
        args = list(r.readlines())
    N = int(args[0])
    use = math.ceil(N/1000)
    print(1000*use - N)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    with open('in.csv', 'r') as r:
        args = list(r.readlines())
    N = int(args[0])
    print(N%1000)
    
if __name__ == "__main__":
    main()
Problem p02717 (python)

Fixed submission:
def main():
    args = input().rstrip().split(' ')
    a, b, c = int(args[0]), int(args[1]), int(args[2])
    print('{} {} {}'.format(c, a, b))
    
if __name__ == "__main__":
    main()

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

def main():
    args1, args2 = input().rstrip().split(' '), input().rstrip().split(' ')
    N, M = int(args1[0]), int(args1[1])
    items = np.array([int(val) for val in args2])
    items = np.sort(items)[::-1]
    items_sum = np.sum(items)
    bottom = items_sum / 4. / M
    
    if(items[M-1] >= bottom):
        print('Yes')
    else:
        print('No')
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
args = sys.argv

a, b, c = int(args[1]), int(args[2]), int(args[3])
print('{} {} {}'.format(c, a, b))
Problem p02761 (python)

Fixed submission:
import numpy as np

def main():
    rule = {1:[0, 10], 2:[10, 100], 3:[100, 1000]}
    args = input().rstrip().split(' ')
    N, M = int(args[0]), int(args[1])
    query = []
    for i in range(M):
        args = input().rstrip().split(' ')
        query.append([int(args[0]), int(args[1])])
        
    global_flag = False
    for i in range(rule[N][0], rule[N][1]):
        if(N==1):
            val = np.array([i, -1,-1, -1, -1])
        elif(N==2):
            val = np.array([int(i/10), i%10, -1, -1, -1])
        else:
            val = np.array([int(i/100), int(i%100/10), i%10, -1, -1])
        
        flag = True
        for q in query:
            if(val[q[0]-1] != q[1]):
                flag = False
                break
        if(flag == True):
            print(i)
            global_flag = True
            break
    if(global_flag == False):
        print('-1')
    
if __name__ == "__main__":
    main()

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

def main():
    rule = {1:[0, 10], 2:[10, 100], 3:[100, 1000]}
    args = input().rstrip().split(' ')
    N, M = int(args[0]), int(args[1])
    query = []
    for i in range(M):
        args = input().rstrip().split(' ')
        query.append([int(args[0]), int(args[1])])
        
    for i in range(rule[N][0], rule[N][1]):
        if(N==1):
            val = np.array([i, -1,-1, -1, -1])
        elif(N==2):
            val = np.array([int(i/10), i%10, -1, -1, -1])
        else:
            val = np.array([int(i/100), int(i%100/10), i%10, -1, -1])
        
        flag = True
        for q in query:
            if(val[q[0]] != q[1]):
                flag = False
                break
        if(flag == True):
            print(i)
            sys.exit(1)
    print('-1')
    
if __name__ == "__main__":
    main()
Problem p03494 (python)

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

ans = -1
f = True

while (f):
    ans += 1
    for i in range(n):
        if (A[i] == 0 or A[i] % 2 != 0):
            f = False
            break
        A[i] /= 2

print(ans)

Buggy submission (verdict: Runtime Error):
a = input()
ans = 0

for i in range(3):
    if (a[i] == '1'):
        ans += 1

print(ans)
Problem p02765 (python)

Fixed submission:
N,R = map(int,input().split())
 
if N<10:
  print(R+100*(10-N))
else:
  print(R)

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

if N<10:
  print(100*(10-K))
else:
  print(R)
Problem p02789 (python)

Fixed submission:
N,M = map(int,input().split())
 
print("Yes") if N==M else print("No")

Buggy submission (verdict: Runtime Error):
N,M = map(int,input())

print("Yes") if N==M else print("No")
Problem p02801 (python)

Fixed submission:
C = input()
 
print(chr(ord(C)+1))

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

print(char(ord(C)+1))
Problem p03264 (python)

Fixed submission:
K = int(input())
 
ev = K//2
odd = K//2 + K%2
print(ev*odd)

Buggy submission (verdict: Runtime Error):
K = int(input())

ev = K//2
odd = k//2 + K%2
print(ev*odd)