Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
nums = input().spilt(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
    print(num1+num2)
else:
    print(num2-num1)

Fixed submission:
nums = input().split(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
  print(num1+num2)
else:
  print(num2-num1)

Buggy python submission (verdict: Runtime Error):
nums = input().spilt(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
  print(num1+num2)
else:
  print(num2-num1)

Fixed submission:
nums = input().split(" ")
num1 = int(nums[0])
num2 = int(nums[1])
if num2 % num1 == 0:
  print(num1+num2)
else:
  print(num2-num1)

Buggy python submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, raw_input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, raw_input().split())
    if int(b) % int(a) == 0:
	print(int(a) + int(b))
    else:
	print(int(b)-int(a))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)
rl = lambda: sys.stdin.readline().strip()

def main():
    """ Code implementation """
    a, b = rl().split()
    if int(b) % int(a) == 0:
	print(int(a) + int(b))
    else:
	print(int(b)-int(a))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import pprint

pp = pprint.PrettyPrinter(indent=4)

def main():
    """ Code implementation """
    a, b = map(int, input().split())
    if b % a == 0:
        print(b + a)
    else:
        print(b - a)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
A, B = [int(s) for in input().split(' ')]

if A % B:
  print(A + B)
else:
  print(B - A)

Fixed submission:
A, B = [int(s) for s in input().split(' ')]

if B % A == 0:
  print(A + B)
else:
  print(B - A)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [int(s) for s in input().split(' ')]

while len(L) > 1:
  L.sort()
  if L[-1] % L[0] == 0:
    L.pop()
  else:
    L[-1] = L[-1] % L[0]
print(L[0])

Fixed submission:
N = int(input())
L = [int(s) for s in input().split(' ')]

while len(L) > 1:
  L.sort()
  L_new = [L[0]]
  for l in L[1:]:
    v = l % L_new[0]
    if v != 0:
      L_new.append(v)
  L = L_new
print(L[0])

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = [int(s) for s in input().split(' ')]

while len(L) > 1:
	L.sort()
    if L[-1] % L[0] == 0:
      L.pop()
    else:
      L[-1] = L[-1] % L[0]
print(L[0])

Fixed submission:
N = int(input())
L = [int(s) for s in input().split(' ')]

while len(L) > 1:
  L.sort()
  L_new = [L[0]]
  for l in L[1:]:
    v = l % L_new[0]
    if v != 0:
      L_new.append(v)
  L = L_new
print(L[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
a = sorted(a)
while len(a) > 1:
    for i in range(1,len(a)):
        if a[len(a)-i] % a[0] == 0:
            a.pop(len(a)-i)
        else: a[len(a)-i] %= a[0]
    a = sorted(a)
print(a[0])

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
def gcm(a,b):
    if a >= b:
        if a % b == 0:
            return b 
        else:
            return gcm(b,a%b)
    else: return gcm(b,a)
for i in range(1,len(a)):
    a[0] = gcm(a[0],a[i])
print(a[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
a = sorted(a)
while len(a) > 1:
    for i in range(1,len(a)):
        if a[len(a)-1-i] % a[0] == 0:
            a.pop()
        else: a[len(a)-1-i] %= a[0]
    a = sorted(a)
print(a[0])

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
def gcm(a,b):
    if a >= b:
        if a % b == 0:
            return b 
        else:
            return gcm(b,a%b)
    else: return gcm(b,a)
for i in range(1,len(a)):
    a[0] = gcm(a[0],a[i])
print(a[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
a = sorted(a)
while len(a) > 1:
    for i in range(1:len(a)):
        if a[len(a)-1-i] % a[0] == 0:
            a.pop()
        else: a[len(a)-1-i] %= a[0]
    a = sorted(a)
print(a[0])

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
def gcm(a,b):
    if a >= b:
        if a % b == 0:
            return b 
        else:
            return gcm(b,a%b)
    else: return gcm(b,a)
for i in range(1,len(a)):
    a[0] = gcm(a[0],a[i])
print(a[0])
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factrial(n)//(2*math.factrial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Fixed submission:
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factorial(n)/(2*math.factorial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import collections
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kaijo(n):
    if n == 0:
        return 1
    else:
        return n*kaijo(n-1)
def kumi(n):
    return int(kaijo(n)/(2*kaijo(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Fixed submission:
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factorial(n)/(2*math.factorial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8

list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
hako = []
for i in a:
    hako.append(int(i))

ans = 0
for i in range(N):
    for j in range(N - i):
        if sum(hako[i:i+j+1]) % M == 0:
            ans += 1
print(ans)

Fixed submission:
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factorial(n)/(2*math.factorial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)
Buggy python submission (verdict: Time Limit Exceeded):
class vertex : 
    def __init__(self) : 
        self.edges = []

    def add_edge(self, u, weight) : 
        self.edges.append((u, weight))


def dfs(graph, V, s) : 
    for node in s : 
        travelled = [0 for _ in xrange(V)]
        if travelled[node] : 
            continue
        
        stack = []
        stack.append((node, 0))

        while stack : 
            index, full_weight = stack.pop()

            for dst, weight in graph[index].edges :
                if travelled[dst] :
                    if travelled[dst] != travelled[index] + weight : 
                        return False
                    continue
                
                travelled[dst] = travelled[index] + weight
                stack.append((dst, travelled[index] + weight))

    
    return True


V, E = map(int, raw_input().strip().split(' '))

graph = [vertex() for _ in xrange(V)]

memo  = [False for _ in xrange(V)]
s     = set([])
for _ in xrange(E) : 
    l, r, d = map(int, raw_input().strip().split(' '))
    l -= 1
    r -= 1
    graph[l].add_edge(r, d)
    memo[r] = True
    s.add(l)
    s.add(r)


if dfs(graph, V, s) :
    print "Yes"
else : 
    print "No"



Fixed submission:
class vertex : 
    def __init__(self) : 
        self.edges = []

    def add_edge(self, v, weight) : 
        self.edges.append((v, weight))



def dfs(graph, V, memo, d) : 
    for node in [i for (i, b) in enumerate(memo) if not b and i in d] :
        travelled = [0 for _ in xrange(V)]
        if travelled[node] : 
            continue
        
        stack = []
        stack.append((node, 0))
        
        while stack : 
            index, full_weight = stack.pop()
            d[index] = True
            
            for dst, weight in graph[index].edges :
                if travelled[dst] :
                    if travelled[dst] != travelled[index] + weight : 
                        return False
                    continue
                
                travelled[dst] = travelled[index] + weight
                stack.append((dst, travelled[index] + weight))
    
    return True


V, E = map(int, raw_input().strip().split(' '))

graph = [vertex() for _ in xrange(V)]

memo  = [False for _ in xrange(V)]
di    = {}
for _ in xrange(E) : 
    l, r, d = map(int, raw_input().strip().split(' '))
    l -= 1
    r -= 1
    graph[l].add_edge(r, d)
    memo[r] = True
    di[l] = False
    di[r] = False

if dfs(graph, V, memo, di) :
    for k in di : 
        if not di[k] : 
            print "No"
            break
    else : 
        print "Yes"
else : 
    print "No"
Buggy python submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(n)]
dic = {}
for hobbies in e:
    for i in range(1,len(hobbies)+1):
        if hobbies[i] in dic:
            dic[hobbies[i]] +=1
        else:
            dic[hobbies[i]] = 0
everyoneLike = []
for key,num in dic.items():
    if num == n:
        everyoneLike.append(key)
print(len(everyoneLike))


Fixed submission:
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(n)]
dic = {}
for hobbies in e:
    for i in range(1,len(hobbies)):
        if hobbies[i] in dic:
            dic[hobbies[i]] +=1
        else:
            dic[hobbies[i]] = 1
everyoneLike = []
for key,num in dic.items():
    if num == n:
        everyoneLike.append(key)
print(len(everyoneLike))
Buggy python submission (verdict: Runtime Error):
n, k = input()
re = ""
if n - k > 0:
    re="YES"
else:
    re="NO"
print(re)

Fixed submission:
n, k = (int(i) for i in input().split())
re = ""
if (2 * k - 1) <= n:
    re = "YES"
else:
    re = "NO"
print(re)

Buggy python submission (verdict: Runtime Error):
n, k = input()
re = ""
if n - k > 0:
    re.jpin("YES")
else:
    re.jpin("NO")
print(re)

Fixed submission:
n, k = (int(i) for i in input().split())
re = ""
if (2 * k - 1) <= n:
    re = "YES"
else:
    re = "NO"
print(re)

Buggy python submission (verdict: Runtime Error):
if n - k > 0:
    return "YES"
else:
    return "NO"

Fixed submission:
n, k = (int(i) for i in input().split())
re = ""
if (2 * k - 1) <= n:
    re = "YES"
else:
    re = "NO"
print(re)
Buggy python submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
a=ip[0];b=ip[1];k=ip[2]
ans=list()
for i in range(0,k):
    ans.append(a)
    ans.append(b)
    a=a+1
    b=b-1
    if((a==ip[1])|(b==ip[0])):
        break
res=list(set(ans))
res.sort()
for i in res:
    print(i)

Fixed submission:
S=input()
x='abc'
ck=1
for i in x:
	if i in S:
		ck=ck*1
	else:
		ck=ck*0
if ck==1:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
import numpy as np
ip=[int(x) for x in input().split()]
x=ip[1]-ip[0]+1
n=np.linspace(ip[0],ip[1],x)
xl=list(n[:ip[2]])
xh=list(n[-ip[2]:])
ans=xl+xh
anss=list(set(ans))
anss.sort()
for i in anss:
	print(int(i))

Fixed submission:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)

Buggy python submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
n=list(range(ip[0],ip[1]+1))
xl=n[:ip[2]]
xh=n[-ip[2]:]
ans=xl+xh
anset=list(set(ans))
anset.sort()
for i in anset:
	print(i)

Fixed submission:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)

Buggy python submission (verdict: Runtime Error):
ip=[int(x) for x in input().split()]
n=list(range(ip[0],ip[1]+1))
print(n)
xl=n[:ip[2]]
xh=n[-ip[2]:]
ans=xl+xh
anset=list(set(ans))
anset.sort()
for i in anset:
	print(i)



Fixed submission:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)
Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    r = a%b
    #print(a,b,r)
    if(r==0): return b
    return gcd(b,r)
n = int(input()) 
#n=4
hps = [int(i) for i in input().split()]
#lst = [2, 2, 8, 40]
#lst = [5, 13, 8, 1000000000]
#lst = [0, 1, 0]
    ##2 4 5 -> 1
    ## minと全ての要素のgcd
hps = sorted(hps)
for i in range(1,n):
    hps[0] = gcd(hps[i], hps[0])
print(hps)
for i in range(len(hps)):
    if(hps[i]==0): continue
    print(hps[i])
    break

Fixed submission:
a, b= (int(i) for i in input().split())  

if(b%a==0):
    print(a+b)
else:
    print(b-a)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input()) 
#n=4
lst = [int(i) for i in input().split()]
#lst = [2, 2, 8, 40]
#lst = [5, 13, 8, 1000000000]
#lst = [0, 1, 0]
hps = np.array(lst)
while(1):
    hps = sorted(hps)
    #print(hps)
    if(hps[0]==0): break
    if(hps[0]==hps[len(hps)-1]): break
    hps[1] = hps[1] - hps[0]
print(hps[1])

Fixed submission:
a, b= (int(i) for i in input().split())  

if(b%a==0):
    print(a+b)
else:
    print(b-a)
Buggy python submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)]

Fixed submission:
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(N)]
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy python submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)] 
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Fixed submission:
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(N)]
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy python submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(n)] 

import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Fixed submission:
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(N)]
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Buggy python submission (verdict: Runtime Error):
N, M= (int(i) for i in input().split())
for num in range(N):
    lst[num] = [int(i) for i in input().split()]
    
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))

Fixed submission:
N, M= (int(i) for i in input().split())
lst = [[int(i) for i in input().split()] for i in range(N)]
import numpy as np
food = np.zeros((N,M))
for i in range(N):
    for j in range(lst[i][0]):
        #print(lst[i][j+1])
        food[i][lst[i][j+1]-1] = 1
#print(food)
s = np.sum(food, axis=0)
print(len(s[s==N]))
Buggy python submission (verdict: Runtime Error):
a,b = [int(k) for k in input.split()]
if b%a:
  print(abs(b-a))
else:
  print(a+b)
    

Fixed submission:
a,b = [int(k) for k in input().split()]
if b%a:
  print(abs(b-a))
else:
  print(a+b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(k) for k in input().split()]
import math
ans = math.gcd(a[0],a[1])
for i in a[2:]:
	ans = math.gcd(ans,i)
print(ans)

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

def gcd(x, y): 
  
   while(y): 
       x, y = y, x % y 
  
   return x
ans = gcd(a[0],a[1])
for i in a[2:]:
	ans = gcd(ans,i)
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a])

Fixed submission:
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a!=0])

Buggy python submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
print([a+b,b-a][b%a])

Fixed submission:
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a!=0])
Buggy python submission (verdict: Runtime Error):
n, k = [int(i) for i in input().split()]
lines = [set(input().split()[1:]) for i in range(n)]
diff = set(lines[0])
for i in range(1,len(lines)):
  diff = diff&line
print(len(diff))

Fixed submission:
n, k = [int(i) for i in input().split()]
lines = [set(input().split()[1:]) for i in range(n)]
diff = set(lines[0])
for i in range(1,len(lines)):
  diff = diff&lines[i]
print(len(diff))
Buggy python submission (verdict: Runtime Error):
arr = sorted(input().split())
print(arr[0]*arr[1]/2)

Fixed submission:
arr = sorted(list(map(int,input().split())))
print(int(arr[0]*arr[1]/2))
Buggy python submission (verdict: Runtime Error):
string = input()
a, b = string.split(' ')[0], string.split(' ')[1]
result = a * b - (a + b -1)
print(result)

Fixed submission:
string = input()
a, b = int(string.split(' ')[0]), int(string.split(' ')[1])
result = a * b - (a + b -1)
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
AB = [[], []]
ab = [0, 0]

for i in range(N):
    inp = list(map(int, input().split()))
    AB[0].append(inp[0])
    AB[1].append(inp[1])

for i in range(N):
    m = max(AB[i%2])
    indexs = [j for j, x in enumerate(AB[i%2]) if x == max(AB[i%2])]
    B = []
    for j in range(len(indexs)):
        B.append(AB[(i+1)%2][indexs[j]])
    index = AB[(i+1)%2].index(max(AB[(i+1)%2]))
    ab[i%2] += m
    del AB[0][index]
    del AB[1][index]

print(ab[0] - ab[1])

Fixed submission:
N = int(input())
ABab = []
for i in range(N):
    a, b = list(map(int, input().split()))
    ABab.append([a+b, a, -1*b])
ABab.sort(reverse = True)
ans = 0
for i in range(N):
    ans += ABab[i][i%2 + 1]
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else
  print(b - a) 



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

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


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

Buggy python submission (verdict: Runtime Error):
a,b=[int(i) for i in input().split()] 
if( a/b === 0){
  print a + b
} else {
  print b -a 
}


Fixed submission:
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def main():
	N = input()
	while i % 2 == 0:
      i = N / 2
	print(i*2)

if __name__ == '__main__':
	main()



Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
 
def main():
	N = int(input())
	if N % 2 == 0:
		print(int(N))
	else:
		print(int(N*2))
 
if __name__ == '__main__':
	main()
Buggy python submission (verdict: Time Limit Exceeded):
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
i = 1

if X < Y:
    print(X)
    a = False
elif X > Y:
    while X * i <= X * Y:
        if (X * i) % Y != 0:
            print(X * i)
            a = False
            break
        else:
            i += 1
if a:
    print(-1)

Fixed submission:
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
i = 1

if X < Y:
    print(X)
    a = False
elif X > Y and X % Y != 0:
    while X * i <= X * Y:
        if (X * i) % Y != 0:
            print(X * i)
            a = False
            break
        else:
            i += 1
if a:
    print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
i = 1
while X * i <= X * Y:
    if (X * i) % Y != 0:
        print(X * i)
        a = False
        break
    else:
        i += 1
if a:
    print(-1)

Fixed submission:
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
i = 1

if X < Y:
    print(X)
    a = False
elif X > Y and X % Y != 0:
    while X * i <= X * Y:
        if (X * i) % Y != 0:
            print(X * i)
            a = False
            break
        else:
            i += 1
if a:
    print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
for i in range(1, 1000000000):
    if i % X == 0:
        if i % Y != 0:
            a = False
            print(i)
            break
        else:
            break
if a:
    print(-1)

Fixed submission:
xy = input()
XY = xy.split()
X = int(XY[0])
Y = int(XY[1])

a = True
i = 1

if X < Y:
    print(X)
    a = False
elif X > Y and X % Y != 0:
    while X * i <= X * Y:
        if (X * i) % Y != 0:
            print(X * i)
            a = False
            break
        else:
            i += 1
if a:
    print(-1)