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

Fixed submission:
a,b,c = map(int, raw_input().split())
if b-a == c-b:
	print "YES"
else:
	print "NO"

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())

for count in range(0,n-1):
    if count == 0:
        compare1 = set(list_str[count])
    else:
        compare1 = set(output)
    compare2 = set(list_str[count+1])
    output = list(compare1 & compare2)
output = ''.join(output)
print output

Buggy submission (verdict: Runtime Error):
n = map(int, raw_input().split())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())

for count in range(0,n-1):
    if count == 0:
        compare1 = set(list_str[count])
    else:
        compare1 = set(output)
    compare2 = set(list_str[count+1])
    output = list(compare1 & compare2)
output = ''.join(output)
print output

Buggy submission (verdict: Runtime Error):
O = raw_input()
E = raw_input()
out = O+E
out =  list(out)
for count in range(0,len(out)/2):
	out[2*count] = O[count]
	out[2*count+1] = E[count]
if len(O) > len(E):
	out[2*count+2] = O[count+1]
out = ''.join(out)
print out
Problem p03760 (python)

Fixed submission:
O = raw_input()
E = raw_input()
out = O+E
out =  list(out)
for count in range(0,len(out)/2):
	out[2*count] = O[count]
	out[2*count+1] = E[count]
if len(O) > len(E):
	out[2*count+2] = O[count+1]
out = ''.join(out)
print out

Buggy submission (verdict: Runtime Error):
O = raw_input()
E = raw_input()
out = O+E
for count in range(0,len(out)/2):
	out[2*count] == O[count]
	out[2*count+1] == E[count]
if len(O) > len(E):
	out[2*count+2] = O[count+1]
print out

Buggy submission (verdict: Runtime Error):
O = raw_input()
E = raw_input()
out = O+E
out[::2] = E
out[1::2] = O

Buggy submission (verdict: Runtime Error):
O = map(int, raw_input().split())
E = map(int, raw_input().split())
out = O+E
out[::2] = E
out[1::2] = O
Problem p03773 (python)

Fixed submission:
a,b = map(int, raw_input().split())
print (a+b)%24

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

Buggy submission (verdict: Runtime Error):
a, b = (int(i) for i in input().split())  
print (a+b)%24
Problem p03759 (python)

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

if a - b == b - c:
  print 'YES'
else:
  print 'NO'

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print ''.join([x+y for x,y in zip(a,b)]) + ( a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else '' )

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print(''.join([x+y for x,y in zip(a,b)]) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
))

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print(''.join([x+y for x,y in zip(a,b)]) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
))

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print ''.join(x+y for x,y in zip(a,b)) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
)

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print ''.join(x+y for x,y in zip(a,b)) + (
  a[-1] if len(a) > len(b) else b[-1] if len(b) > len(a) else ''
)

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()

print ''.join(x+y for x,y in zip(a,b))

Buggy submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

if a - b == b - c:
  print 'YES'
else:
  print 'NO'
Problem p03777 (python)

Fixed submission:
a, b = raw_input().split()

if a == "H":
    print b
else:
    if b == "H":
        print "D"
    else:
        print "H"

Buggy submission (verdict: Runtime Error):
a, b = raw_input.split()

if a == "H":
    print b
else:
    if b == "H":
        print "D"
    else:
        print "H"
Problem p03795 (python)

Fixed submission:
import sys
N = int(raw_input())
assert(1 <= N <= 100)
x = 800*N
y = (N/15)*200
print x - y

Buggy submission (verdict: Runtime Error):
import sys
N = int(sys.argv[1])
x = 800*N
y = (N/15)*200
print x - y

Buggy submission (verdict: Runtime Error):
import sys
N = int(sys.argv[1])
assert(1 <= N <= 100)
x = 800*N
y = (N/15)*200
print x - y
Problem p03760 (python)

Fixed submission:
o = list(input())
e = list(input())+[""]
for x,y in zip(o,e):
  print(x+y,end="")

Buggy submission (verdict: Runtime Error):
o = list(input())
e = list(input())

for i in range(len(o)):
  print(o[i]+e[i],end="")

Buggy submission (verdict: Runtime Error):
o = list(input())
e = list(input())

for i in range(len(o)):
  print(o[i],e[i],end="")

Buggy submission (verdict: Runtime Error):
o = list(input())
e = list(input())

for i in range(len(o)):
  print(o[i],e[i],end="")

Buggy submission (verdict: Runtime Error):
o = list(input())
e = list(input())

for i in range(len(o)):
  print(o[i],e[i],end="")
Problem p03844 (python)

Fixed submission:
import sys

def main():
    arg = raw_input().split(" ")
    a = int(arg[0])
    b = int(arg[2])
    op = arg[1]
    if a < 1 or b > 10 **9:
        return 0

    if op == "+":
        return a + b
    elif op == "-":
        return a - b
    else:
        return 0

print main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    arg = sys.argv[1:]
    a = int(arg[0])
    b = int(arg[2])
    op = arg[1]
    #if a < 1 or b > 10 **9:
    #    return 0

    if op == "+":
        return a + b
    elif op == "-":
        return a - b
    #else:
    #    return 0

print main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    arg = sys.argv[1:]
    a = int(arg[0])
    b = int(arg[2])
    op = arg[1]
    if a < 1 or b > 10 **9:
        return 0

    if op == "+":
        return a + b
    elif op == "-":
        return a - b
    else:
        return 0

print main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    arg = sys.argv[1:]
    a = int(arg[0])
    b = int(arg[2])
    op = arg[1]
    if a < 1 or b > 10 **9:
        return 0

    if op == "+":
        return a + b
    elif op == "-":
        return a - b
    else:
        return 0

print main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    arg = sys.argv[1:]
    if arg[1] == "+":
        return int(arg[0]) + int(arg[2])
    elif arg[1] == "-":
        return int(arg[0]) - int(arg[2])
    else:
        return 0

print main()
Problem p03773 (python)

Fixed submission:
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

output = (A + B)%24

print(output)

Buggy submission (verdict: Runtime Error):
import math

def C(n, r):
	fact = math.factorial
	return fact(n) // fact(r) // fact(n-r)

N, A, B = map(int, input().split())
v = list(map(int, input().split()))

v_sort = sorted(v, reverse=True)

print(sum(v_sort[:A])/A)

a, b = v_sort.count(v_sort[A-1]), v_sort[:A].count(v_sort[A-1])

if v_sort[0] == v_sort[A-1]:
	print(sum([C(a, r) for r in range(A, min(B, a)+1)]))
else:
	print(C(a, b))
Problem p03777 (python)

Fixed submission:
def main():
    a, b = input().split()
    if a == "H":
        print(b)
    else:
        print("H" if b == "D" else "D")


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    w, a, b = map(int, input().split())
    if a <= b <= a + w or b <= a <= b + w:
        print(0)
    else:
        print(min(abs(a + w - b), abs(b + w - a)))


if __name__ == "__main__":
    main()
Problem p03972 (python)

Fixed submission:
w, h = list(map(int, input().split()))
xs = [int(input()) for _ in range(w)]
ys = [int(input()) for _ in range(h)]

x_cnt = w + 1
y_cnt = h + 1

i = 0
j = 0
xs.sort()
ys.sort()

ans = 0
while i < len(xs) or j < len(ys):
    if i >= len(xs) or (j < len(ys) and ys[j] < xs[i]):
        ans += x_cnt * ys[j]
        j += 1
        y_cnt -= 1
    else:
        ans += y_cnt * xs[i]
        i += 1
        x_cnt -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
w, h = list(map(int, input().split()))
xs = [int(input()) for _ in range(w)]
ys = [int(input()) for _ in range(h)]

x_cnt = w + 1
y_cnt = h + 1

i = 0
j = 0
xs.sort()
ys.sort()

ans = 0
while i < len(xs) or j < len(ys):
    if i >= len(xs) or ys[j] < xs[i]:
        ans += x_cnt * ys[j]
        j += 1
        y_cnt -= 1
    else:
        ans += y_cnt * xs[i]
        i += 1
        x_cnt -= 1
print(ans)
Problem p03773 (python)

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

print((A+B)%24)

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

print((A+B)%24)

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

print((A+B)%24)

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

print((A+B)%24)
Problem p03777 (python)

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

if a==b=="H" :
    print("H")
elif a==b=="D":
    print("H")
else:
    print("D")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

if a==b=="H" :
    print("H")
elif a==b=="D":
    print("H")
else:
    print("D")
Problem p03773 (python)

Fixed submission:
print(sum(map(int,raw_input().split()))%24)

Buggy submission (verdict: Runtime Error):
import sys

if __name__=="__main__":
    ab=[]
    cd=[]
    [n,m]=map(int,raw_input().split(" "))
    for i in range(n):
        ab.append( map(int,raw_input().split(" ")) )
    for j in range(m):
        cd.append( map(int,raw_input().split(" ")) )
    for i in range(n):
        min=sys.maxint
        index=0
        for j in range(m):
            distance = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
            if min > distance :
                min=distance 
                index=j
        print(index+1)

Buggy submission (verdict: Runtime Error):
import sys

if __name__=="__main__":
    ab=[]
    cd=[]
    [n,m]=map(int,raw_input().split(" "))
    for i in range(n):
        ab.append( map(int,raw_input().split(" ")) )
    for j in range(m):
        cd.append( map(int,raw_input().split(" ")) )
    for i in range(n):
        min=sys.maxint
        index=0
        for j in range(m):
            distance = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
            if min > distance :
                min=distance 
                index=j
        print(index+1)

Buggy submission (verdict: Runtime Error):
print(sum(map(int,raw_input().split()))%24)
Problem p03779 (python)

Fixed submission:
# -*- coding: utf-8 -*-

X= int(raw_input())

a = 0
while X >0:
    a += 1
    X -= a
print a

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

X= int(raw_input().split())

a = 0
while X >0:
    a += 1
    X -= a
print a

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

X= map(int,raw_input().split())

a = 0
while X >0:
    a += 1
    X -= a
print a
Problem p03773 (python)

Fixed submission:
L = [int(i) for i in input().split(' ')]
print((L[0] + L[1]) % 24)

Buggy submission (verdict: Runtime Error):
#include <stdio.h>

int abs(int j)
{
    return (j>0) ? j : -j;
}

int main()
{
    int N, M, i, j;
    int a[50], b[50], c[50], d[50],;
    int p[50] = {0};

    scanf("%d %d", &N, &M);
    
    for(i=0; i<N; i++)
    {
         scanf("%d %d", &a[i], &b[i]);
    }
    
    for(j=0; j<M; j++)
    {
         scanf("%d %d", &c[j], &d[j]);
    }
    
    for(i=0; i<N; i++)
    {
         for(j=0; j<M; j++)
         {
             if(abs(a[i] - c[j]) + abs(b[i] - d[j]) < abs(a[i] - c[p[i]]) + abs(b[i] - d[p[i]])
             {
                 p[i] = j;
             }
         }
         printf("%d\n", p[i]);
    }
}

Buggy submission (verdict: Runtime Error):
l = map(int, input().split())
print((l[0] + l[1]) % 24)

Buggy submission (verdict: Runtime Error):
l = map(int, raw_input().split())
print((l[0] + l[1]) % 24)
Problem p03773 (python)

Fixed submission:
A,B=[int(x) for x in input().split()]
print((A+B)%24)

Buggy submission (verdict: Runtime Error):
def distance(p1,p2):
    return abs(p1[0]-p2[0])+abs(p1[1]-p2[1])

M,N=[int(x) for x in input().split()]

student=[]
check=[]
for i in range(0,M):
    a,b=[int(x) for x in input().split()]
    student.append((a,b))

for j in range(0,N):
    c,d=[int(x) for x in input().split()]
    check.append((c,d))


for i in range(0,M):
    dist=distance(student[i],check[N-1])
    num=N-1
    for j in range(0,N):
        k=N-j-1
        if dist>=distance(student[i],check[k]):
            dist=distance(student[i],check[k])
            num=k
    print(num+1)
Problem p03943 (python)

Fixed submission:
candies=[int(x) for x in input().split()]
candies.sort()
if candies[2]==(candies[0]+candies[1]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
from itertools import combinations

N,T=[int(x) for x in input().split()]
towns=list([int(x) for x in input().split()])

com=combinations(list(range(0,N)),2)

bene=[]
for c in com:
    bene.append(towns[c[1]]-towns[c[0]])

max_bene=max(bene)
print(len([item for item in [x for x in bene if x==max_bene]]))

Buggy submission (verdict: Runtime Error):
print(len(re.sub("B+","B",re.sub("W+","W",input())))-1)
Problem p03945 (python)

Fixed submission:
S=list(input())

def transform(S):
    r_S=[S[0]]
    now_c=S[0]
    for item in S:
        if now_c==item:
            pass
        else:
            now_c=item
            r_S.append(item)

    return r_S

print(len(transform(S))-1)

Buggy submission (verdict: Runtime Error):
import re
print(len(re.sub("B+","B",re.sub("W+","W",S)))-1)
Problem p03773 (python)

Fixed submission:
AB = input()
if len(AB) <= 2:
    ABL = [AB]
else:
    ABL= AB.replace("\n", " ").split(" ")



A = int(ABL[0])
if len(AB) <= 2:
    C = A
else:
    B = ABL[1]
    C = int(A) + int(B )
    
if C >= 24:
    C -= 24
print(C)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = A + B 
if C >= 24:
    C -= 24
print(C)
Problem p03773 (python)

Fixed submission:
A, B = map(int, input().split())
print((A + B) % 24)

Buggy submission (verdict: Runtime Error):
import math
def digit(X):
    d = 0
    while X:
        X //= 10
        d += 1
    return d

def F(A, B):
    return max(digit(A), digit(B))

N = int(input())

min_F = 20
max_div = round(math.sqrt(N))
for i in range(1, max_div):
    if N % i == 0:
        f = F(i, N/i)
        if f < min_F:
            min_F = f
print(min_F)
Problem p03795 (python)

Fixed submission:
# -*- coding:utf-8 -*-
n = int(input())

r = int(n/15)
print(n*800-r*200)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
n = int(input())

r = int(n/15
print(n*800-r*200)
Problem p03799 (python)

Fixed submission:
# -*- coding:utf-8 -*-
n,m = map(int, raw_input().split())

l = (n*2+m)/4

answer = l if l>= n else min(n,m/2)
print(answer)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
from operator import itemgetter
n = int(raw_input())
a = [[int(k),i+1] for i,k in enumerate(raw_input().split())]
a.sort(key=itemgetter(0),reverse=True)
s = []
b = []
a.append([0,0])
for i,p in enumerate(a[:-1]):
    if not p[0] == a[i+1][0]:
        q = a[i][0] - a[i+1][0]
        y = [z[1] for z in a[:i+1]]
        s.extend([min(y)]*(i+1)*q)

for i in xrange(1,int(n)+1):
    print(s.count(i))
Problem p03801 (python)

Fixed submission:
# -*- coding:utf-8 -*-
n = int(raw_input())
a = [[int(k),i+1] for i,k in enumerate(raw_input().split())]
a.sort(reverse=True)
z = [l[1] for l in a]
s=[0]*n
a.append([0,0])
min_a_i = float('inf')
for i,p in enumerate(a[:-1]):
    min_a_i = min(min_a_i, a[i][1])
    if not p[0] == a[i+1][0]:
        q = p[0] - a[i+1][0]
        s[min_a_i-1] += (i+1)*q

for t in s:
    print(t)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
from operator import itemgetter
n = int(raw_input())
a = [[int(k),i+1] for i,k in enumerate(raw_input().split())]
a.sort(key=itemgetter(0),reverse=True)
u = []
s=[0]*n
a.append([0,0])
for i,p in enumerate(a[:-1]):
    if not p[0] == a[i+1][0]:
        q = p[0] - a[i+1][0]
        y = [z[1] for z in a[:i+1]]
        s[min(y)-1] += (i+1)*q
        u.extend([min(y)]*(i+1)*q)

for t in s:
    print(t)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
from operator import itemgetter
n = int(raw_input())
a = [[int(k),i+1] for i,k in enumerate(raw_input().split())]
a.sort(key=itemgetter(0),reverse=True)
s = []
b = []
a.append([0,0])
for i,p in enumerate(a[:-1]):
    if not p[0] == a[i+1][0]:
        q = a[i][0] - a[i+1][0]
        y = [z[1] for z in a[:i+1]]
        s.extend([min(y)]*(i+1)*q)

for i in xrange(1,int(n)+1):
    print(s.count(i))

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
from operator import itemgetter
n = int(raw_input())
a = [[int(k),i+1] for i,k in enumerate(raw_input().split())]
a.sort(key=itemgetter(0),reverse=True)
s = []
b = []
a.append([0,0])
while (True):
    if a[-2][0]==0:break
    a.sort(key=itemgetter(1),reverse=True)
    a.sort(key=itemgetter(0),reverse=True)
    b=[]
    for i,p in enumerate(a[:-1]):
        if not p[0] == a[i+1][0]:
            q = p[0] - a[i+1][0]
            s.extend([p[1]]*(i+1)*q)
            for j in range(i):
                a[j][0] = a[i+1][0]
            a[i][0] = a[i+1][0]
            break
        else:
            pass
for i in xrange(1,int(n)+1):
    print(s.count(i))
Problem p03844 (python)

Fixed submission:
a, op, b = input().split()
if op == '+':
    print(int(a) + int(b))
else:
    print(int(a) - int(b))

Buggy submission (verdict: Runtime Error):
a, op, b = input().split()
if op = '+':
    print(int(a) + int(b))
else:
    print(int(a) - int(b))
Problem p03826 (python)

Fixed submission:
#coding: shift_jis

A,B,C,D = map(int,raw_input().split())

if A*B > C*D:
    print A*B
elif A*B < C*D:
    print C*D
else:
    print A*B

Buggy submission (verdict: Runtime Error):
#coding: shift_jis
N = int(raw_input())
S = raw_input()
x = 0
y = [x]
for i in range(N-1):
    if S[i] == 'I':
        x += 1
    elif S[i] == 'D':
        x -= 1
    y.append(x)
print max(y)

Buggy submission (verdict: Runtime Error):
#coding: shift_jis


N = int(raw_input())
S = raw_input()
x = 0
y = [x]
for i in range(N-1):
    if S[i] == 'I':
        x += 1
    elif S[i] == 'D':
        x -= 1
    y.append(x)
print max(y)
Problem p03827 (python)

Fixed submission:
#coding: shift_jis


N = int(raw_input())
S = raw_input()
x = 0
y = [x]
for i in range(N):
    if S[i] == 'I':
        x += 1
    elif S[i] == 'D':
        x -= 1
    y.append(x)
print max(y)

Buggy submission (verdict: Runtime Error):
#coding: shift_jis


N = int(raw_input())
S = raw_input()
x = 0
y = [x]
for i in range(N):
    if S[i] == 'I':
        x += 1
    elif S[i] == 'D':
        x -= 1
    y.append(x)
print max(y)



    



  
    
    

    
    
#coding: shift_jis


N = int(raw_input())
S = raw_input()
x = 0
y = [x]
for i in range(N):
    if S[i] == 'I':
        x += 1
    elif S[i] == 'D':
        x -= 1
    y.append(x)
print max(y)
Problem p03777 (python)

Fixed submission:
key = tuple(input().split())
table = {("H", "H"): "H", ("H", "D"): "D",
         ("D", "H"): "D", ("D", "D"): "H"}
print(table[key])

Buggy submission (verdict: Runtime Error):
X = int(input())
dist = [0]
prev_dist = [0]
time = 0
while not X in dist:
    time += 1
    for i in prev_dist:
        if not i+time in dist: dist.append(i+time)
        if not i-time in dist: dist.append(i-time)
    prev_dist = dist[:]
print(time)
Problem p03777 (python)

Fixed submission:
a, b=map(str,input().split())
if(a=="H"):
	print(b)
else:
	if(b=="H"):
		print("D")
	else:
		print("H")

Buggy submission (verdict: Runtime Error):
a, b=map(str,input().split())
if(a=="H"):
	print(b)
else:
	if(b=="H"):
		print(D)
	else:
		print(H)

Buggy submission (verdict: Runtime Error):
a, b=map(str,input().split())
if(a=='H'):
	print(b)
else:
	if(b=='H'):
		print(D)
	else:
		print(H)
Problem p03777 (python)

Fixed submission:
# -*- coding: utf-8 -*-

a, b = map(str, raw_input().split())
result = ''
if a == 'H':
    if b== 'H':
       	result = 'H'
    else:
	result = 'D'
else:
    if b=='H':
        result='D'
    else:
	result='H'

# 出力
print result

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

a, b = map(str, raw_input().split())
result = ''
if a == ‘H’:
	if b== ‘H’:
		result = ‘H’
	else:
		result = ‘D’
else:
	if b==‘H’
		result=‘D’
	else:
		result=‘H'

# 出力
print result
Problem p04029 (python)

Fixed submission:
a =int(input())
s=0
for i in range(a+1):
    s+=i
print(s)

Buggy submission (verdict: Runtime Error):
a =map(int,input())
s=0
for i in range(a[0]+1):
    s+=i
print(s)

Buggy submission (verdict: Runtime Error):
a =map(int,input())
s=0
for i in range(a+1):
    s+=i
print(s)
Problem p04033 (python)

Fixed submission:
a,b = map(int,input().split())
if a*b<=0:
    print("Zero")
elif a<0 and (b-a)%2==0:
    print("Negative")
else:
    print("Positive")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a*b<=0:
    print(Zero)
elif a<0 and (b-a)%2==0:
    print(Positive)
else:
    print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0):
    print(Zero)
elif(a<0 and (b-a)%2==0):
    print(Positive)
else:
    print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0)
    print(Zero)
elif(a<0 and (b-a)%2==0)
    print(Positive)
else
    print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0)
	print(Zero)
elif(a<0 and (b-a)%2==0)
	print(Positive)
else
	print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and (b-a)%2==0)
	print(Positive)
else
	print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and (b-a)%2==0)
	print(Positive)
else
	print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and b-a%2==0)
	print(Positive)
else
	print(Negative)

Buggy submission (verdict: Runtime Error):
a,b = map(int,inout().split())
if(a*b<=0)print(Zero)
elif(a<0 and b-a%2==0)
	print(Positive)
else
	print(Negative)
Problem p03792 (python)

Fixed submission:
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = input().strip()

fullestRows = []
maxCount = 0
for row in range(N):
  count = 0
  for col in range(N):
    if ar[row][col] == '#':
      count += 1
  if count > maxCount:
    maxCount = count
    fullestRows = [row]
  elif count == maxCount:
    fullestRows.append(row)

if maxCount == 0:
  print(-1)
else:
  found = False
  req = 0
  for fr in fullestRows:
    for row in range(N):
      if ar[row][fr] == '#':
        found = True
        break
    if found:
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)

Buggy submission (verdict: Runtime Error):
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = input().strip()

count = N*[0]
fullestRow = -1
maxCount = 0
for row in range(N):
  for col in range(N):
    if ar[row][col] == '#':
      count[row] += 1
  if count[row] > maxCount:
    maxCount = count[row]
    fullestRow = row

if maxCount == 0:
  print(-1)
else:
  req = 0
  for row in range(N):
    if ar[row][fullestRow] == '#':
      found = True
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)

Buggy submission (verdict: Runtime Error):
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = list(input().strip())

count = N*[0]
missing = [N*[] for _ in range(N)]
fullestRow = -1
maxCount = 0
for row in range(N):
  for col in range(N):
    if ar[row][col] == '#':
      count[row] += 1
    else:
      missing[row].append(col)
  if count[row] > maxCount:
    maxCount = count[row]
    fullestRow = row

if maxCount == 0:
  print(-1)
else:
  req = 0
  for row in range(N):
    if ar[row][fullestRow] == '#':
      found = True
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)