Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def even_case(input_list) -> int:
    input_list.sort()

    for i in range(1, len(input_list), 2):
        if input_list[i] // 2 == 1 and input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** (n//2)

    return ans


def odd_case(input_list) -> int:
    input_list.sort()

    if input_list[1] == 0:
        return 0

    for i in range(2, len(input_list), 2):
        if input_list[i] // 2 == 0 and input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** ((n-1) // 2)

    return ans

n = int(input())
input_list = list(map(int, input().split()))
math = 10 ** 9 + 7

if n % 2 == 0:
    result = even_case(input_list)
else:
    result = odd_case(input_list)

print(result % math)

Fixed submission:
def even_case(input_list) -> int:
    input_list.sort()

    if input_list[0] == 0: return 0


    for i in range(1, len(input_list), 2):
        if input_list[i] % 2 == 0 or input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** (n//2)

    return ans


def odd_case(input_list) -> int:
    input_list.sort()

    if input_list[0] != 0: return 0

    if len(input_list) == 1: return 1

    if input_list[1] == 0: return 0

    for i in range(2, len(input_list), 2):
        if input_list[i] % 2 == 1 or input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** ((n-1) // 2)

    return ans

n = int(input())
input_list = list(map(int, input().split()))
math = 10 ** 9 + 7

if n % 2 == 0:
    result = even_case(input_list)
else:
    result = odd_case(input_list)

print(result % math)

Buggy python submission (verdict: Runtime Error):
def even_case(input_list) -> int:
    input_list.sort()

    for i in range(1, len(input_list), 2):
        if input_list[i] // 2 == 1 and input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** (n//2)

    return ans


def odd_case(input_list) -> int:
    input_list.sort()

    if input_list[1] == 0:
        return 0

    for i in range(2, len(input_list), 2):
        if input_list[i] // 2 == 0 and input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** ((n-1) // 2)

    return ans

n = int(input())
input_list = list(map(int, input().split()))

if n % 2 == 0:
    print(even_case(input_list))
else:
    print(odd_case(input_list))

Fixed submission:
def even_case(input_list) -> int:
    input_list.sort()

    if input_list[0] == 0: return 0


    for i in range(1, len(input_list), 2):
        if input_list[i] % 2 == 0 or input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** (n//2)

    return ans


def odd_case(input_list) -> int:
    input_list.sort()

    if input_list[0] != 0: return 0

    if len(input_list) == 1: return 1

    if input_list[1] == 0: return 0

    for i in range(2, len(input_list), 2):
        if input_list[i] % 2 == 1 or input_list[i] != input_list[i-1]:
            return 0

    ans = 2 ** ((n-1) // 2)

    return ans

n = int(input())
input_list = list(map(int, input().split()))
math = 10 ** 9 + 7

if n % 2 == 0:
    result = even_case(input_list)
else:
    result = odd_case(input_list)

print(result % math)
Buggy python submission (verdict: Runtime Error):

def my_turn(card_list):
    card_list.popleft
    if not card_list:
        cont_game = False
    else:
        your_turn = card_list[0]

card_a = [ _ for _ in input()]
card_b = [ _ for _ in input()]
card_c = [ _ for _ in input()]

your_turn = 'a'
cont_game = True

while cont_game:
    if your_turn == 'a':
        my_turn(card_a)
    if your_turn == 'b':
        my_turn(card_a)
    if your_turn == 'c':
        my_turn(card_a)

print(your_turn)

Fixed submission:

def my_turn(card_list):
    global cont_game
    global your_turn
    if card_list:
        your_turn = card_list[0]
        card_list.pop(0)
    else:
        cont_game = False

card_a = [ _ for _ in input()]
card_b = [ _ for _ in input()]
card_c = [ _ for _ in input()]

your_turn = 'a'
cont_game = True

while cont_game:
    if your_turn == 'a':
        my_turn(card_a)
    if your_turn == 'b':
        my_turn(card_b)
    if your_turn == 'c':
        my_turn(card_c)

print(your_turn.upper())
Buggy python submission (verdict: Runtime Error):
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if outputs is None:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')


Fixed submission:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if not outputs:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')

Buggy python submission (verdict: Runtime Error):
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if outputs == None:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')


Fixed submission:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if not outputs:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')

Buggy python submission (verdict: Runtime Error):
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')


Fixed submission:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if not outputs:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')
Buggy python submission (verdict: Runtime Error):
A, B, C = map(input().split())

l = [5, 5, 7]
if A in l:
    l.remove(A)
    if B in l:
        if C in l:
            print('YES')
            break
    print('NO')

Fixed submission:
args = []
args = input()

count_5 = 0
count_7 = 0

for i in args:
    if i == '5':
        count_5+=1
    if i == '7':
        count_7+=1

if count_5 == 2 and count_7 == 1:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
Word=input()
Word_list=list(Word)

number=0
renzoku=0

for num in range(3):
  if Word_list[num]="R":
    number=number+1
  else:
    if(number>renzoku):
      renzoku=number
    number=0

Fixed submission:
Word=input()
Word_list=list(Word)
 
number=0
renzoku=0
Enter=0
 
for num in range(3):
  if Word_list[num]=="R":
    number=number+1
  if (number>renzoku):
      renzoku=number
  else:
    number=0

print(renzoku)

Buggy python submission (verdict: Runtime Error):
s = input()
cnt = 0
l =[]
for i in range(3):
    if s[i] == "R":
        cnt += 1
    else:
        l.append(cnt)
        cnt = 0

print(max(l))
    

Fixed submission:
s = input()
cnt = 0
l =[]
for i in range(3):
    if s[i] == "R":
        cnt += 1
    else:
        l.append(cnt)
        cnt = 0

l.append(cnt)

print(max(l))
Buggy python submission (verdict: Runtime Error):
def main
a, b = map(int,input().split())

print( a* b)
return

main()

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

print(a*b)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n =int(input())
l = list(map(int,input().split()))

if 0 in l:
    result = 0
else:
    arr = np.asarray(l)
    p = np.prod(arr)

    if p > 10 **18:
        p = -1

print(p)

Fixed submission:
def main():
    n = int(input())
    a = list(map(int,input().split()))
    
    if 0 in a:
        print(0)
        return
    
    prod = 1
    for i in a:
        prod *= i
        if prod > 10 ** 18:
            print(-1)
            return
    
    print(prod)
    
    return

main()

Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
l = list(map(int,input().split()))
a = 1
for i in l:
    a *= i
    if a > 10 **18:
        a = -1

if 0 in l:
    a = 0
    
print(a)
    

Fixed submission:
def main():
    n = int(input())
    a = list(map(int,input().split()))
    
    if 0 in a:
        print(0)
        return
    
    prod = 1
    for i in a:
        prod *= i
        if prod > 10 ** 18:
            print(-1)
            return
    
    print(prod)
    
    return

main()

Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
l = list(map(int,input().split()))
a = 1
for i in l:
    a *= i
if a > 10 **18:
    a = -1

print(a)
    

Fixed submission:
def main():
    n = int(input())
    a = list(map(int,input().split()))
    
    if 0 in a:
        print(0)
        return
    
    prod = 1
    for i in a:
        prod *= i
        if prod > 10 ** 18:
            print(-1)
            return
    
    print(prod)
    
    return

main()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ss = []
mylist =[]
for i in range(n):
    temp = input()
    ss.append(temp)
    
cnt = 0
for s in ss:
    if s in mylist:
        next
    else:
        mylist.append(s)
        cnt += 1
        
print(cnt)

Fixed submission:
n = int(input())
ss = set()
for i in range(n):
    temp = input()
    if temp in ss:
        next
    else:
        ss.add(temp)
        
print(len(ss))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ss = []
mylist =[]
for i in range(n):
    temp = input()
    if temp in ss:
        next
    else:
        ss.append(temp)
        
print(len(ss))
    

    

Fixed submission:
n = int(input())
ss = set()
for i in range(n):
    temp = input()
    if temp in ss:
        next
    else:
        ss.add(temp)
        
print(len(ss))
Buggy python submission (verdict: Runtime Error):
import math 
a,b = map(int,input().split())
print(math.ceil(a/x))

Fixed submission:
import math 
a,b = map(int,input().split())
print(math.ceil(a/b))
Buggy python submission (verdict: Runtime Error):
h,n = map(int,input().split())
moves = list(map(int,input().split()))

s = sum(moves)
if s < h:
    resutl = "No"
else:
    result = "Yes"

print(result)

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

s = sum(moves)
if s < h:
    resutl = "No"
else:
    resutl = "Yes"

print(resutl)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
numbers = list(map(int,input().split()))
cnt = 0
for i in range(n):
    if min(numbers[:i+1]) >= numbers[i]:
        cnt += 1

print(cnt)
    

Fixed submission:
n = int(input())
numbers = list(map(int,input().split()))
cnt = 0
a = 2*10**5
for i in range(n):
    a = min(numbers[i],a)
    if a >= numbers[i]:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
n, k = map(int,input().spllit())

if n * 500 >= k :
    print("Yes")
else:
    print("No")

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

if n * 500 >= k :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s,t = map(str,input().split)
print(s + t)

Fixed submission:
s,t = map(str,input().split())
print(t+s)
Buggy python submission (verdict: Runtime Error):
import math
def primecheck(x):
    primes =[]
    for i in range(2,math.ceil(x)):
        if x % i == 0:
            return False
            break 
    return True


x = int(input())
for i in range(x,10**5):
    if primecheck(i):
        break
print(i)




Fixed submission:
import math
def primecheck(x):

    for i in range(2,math.ceil(x*(1/2))):
        if x % i == 0:
            return False
            break 
    return True



x = int(input())
for i in range(x,10**6):
    if primecheck(i):
        break
print(i)
Buggy python submission (verdict: Runtime Error):
import math

a, b = map(int,input().split())
c = math.floor(a * b / math.gcd(a,b))
print(c)

Fixed submission:
import math
def gcd (a,b):
    n = min(a,b)
    m = max(a,b)
    
    b = m % n
    
    while b > 0:
        m = n
        n = b
        b = m % n
    
    return n

a, b = map(int,input().split())
c = math.floor(a * b / gcd(a,b))
print(c)

Buggy python submission (verdict: Runtime Error):
import math

a, b = map(int,input().split())

print(a * b / math.gcd(a,b))

Fixed submission:
import math
def gcd (a,b):
    n = min(a,b)
    m = max(a,b)
    
    b = m % n
    
    while b > 0:
        m = n
        n = b
        b = m % n
    
    return n

a, b = map(int,input().split())
c = math.floor(a * b / gcd(a,b))
print(c)
Buggy python submission (verdict: Runtime Error):
s = input()

l = len(s)
cnt = 0
for i in range(math.ceil(l/2)):
    if s[i] != s[l-i-1]:
        cnt += 1
print(cnt)

Fixed submission:
import math
s = input()

l = len(s)
cnt = 0
for i in range(math.ceil(l/2)):
    if s[i] != s[l-i-1]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
s = input()
d = {"SAN":7,"MAN":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])

Fixed submission:
s = input()
d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])

Buggy python submission (verdict: Runtime Error):
s = input()
d = {"SAN":7,"MAN":1,"TUE":2,"WED":3,"THU":4,"FRI":5,"SAT":6}
print(d[s])

Fixed submission:
s = input()
d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])
Buggy python submission (verdict: Runtime Error):
n = int(input())
result = "No"

for i in range(2,10):
    if n % i == 0:
        result = "Yes"
         break
    else:
        next
print(result)

Fixed submission:
n = int(input())
result = "No"

for i in range(1,10):
    if n % i == 0:
        a = n / i
        
        if a in range(1,10):
            result = "Yes"
            break
    else:
        next
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(input())

start = int(math.sqrt(n)+0.5)

for i in range(start ,n+1):
    if n % i == 0:
        a = i
        b = n // i
        break

print(a + b -2)

Fixed submission:
import math

n = int(input())

start = int(math.sqrt(n)+0.5)
l =[]
for i in range(1,start+1):
    if n % i == 0:
        a = i
        b = n // i
        l.append(a+b-2)

print(min(l))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(input())

start = math.ceil(n**0.5)

for i in range(start ,n+1):
    if n % i == 0:
        a = i
        b = n // i
        break

print(a + b -2)

Fixed submission:
import math

n = int(input())

start = int(math.sqrt(n)+0.5)
l =[]
for i in range(1,start+1):
    if n % i == 0:
        a = i
        b = n // i
        l.append(a+b-2)

print(min(l))
Buggy python submission (verdict: Runtime Error):
n =int(input())
nl = list(map(int,input().split()))
result = 0
for i in range(n):
    for k in range(i+1,n):
        result += nl[i] * nl[k]
        
print(result)

Fixed submission:
a, b = map(int,input().split())
result = max(a - 2* b, 0)
print(result)
Buggy python submission (verdict: Runtime Error):
n = int(input)
print(n**3)

Fixed submission:
n = int(input())
print(n**3)
Buggy python submission (verdict: Time Limit Exceeded):
l,r = map(int,input().split())

result = []

for i in range (l, r):
	for j in range(i+1, r +1 ):

		temp = i * j % 2019
		result.append(temp)

print(min(result))

Fixed submission:
l,r = map(int,input().split())

result = []

for i in range (l, min(r,l + 2019)):
	for j in range(i+1, min(r +1 , i + 1 +2019)):

		temp = i * j % 2019
		result.append(temp)

print(min(result))
Buggy python submission (verdict: Runtime Error):
p,q,r = int(input())
print(min(p+q, p+p+r, q+r, q+q+p, r+p, r+r+q))

Fixed submission:
p,q,r = map(int,input().split())
print(min(p+q, p+p+r, q+r, q+q+p, r+p, r+r+q))
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())

lefts = [0] * m
rights = [0] * m

for i in range(m):
	l, m = map(int,input().split())
	lefts[i] = l
	rights[i] = r

lefts_max = max(lefts)
rithts_min = min(rights)

result = rights_min - lefts_max + 1

print(max(result,0))



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

lefts = [0] * m
rights = [0] * m

for i in range(m):
	l, r = map(int,input().split())
	lefts[i] = l
	rights[i] = r

lefts_max = max(lefts)
rights_min = min(rights)

result = rights_min - lefts_max + 1

print(max(result,0))

Buggy python submission (verdict: Runtime Error):
10 3
3 6
5 7
6 9

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

lefts = [0] * m
rights = [0] * m

for i in range(m):
	l, r = map(int,input().split())
	lefts[i] = l
	rights[i] = r

lefts_max = max(lefts)
rights_min = min(rights)

result = rights_min - lefts_max + 1

print(max(result,0))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())

key = s[k]
result =""
for letter in s:
    if letter == key:
        result = result + key
    else:
        result =result +  "*"

print(result)

Fixed submission:
n = int(input())
s = input()
k = int(input())

key = s[k-1]
result =""

for letter in s:
    if letter == key:
        result = result + key
    else:
        result =result +  "*"

print(result)
Buggy python submission (verdict: Runtime Error):
h,w = map(int, input().split())
#get hight and weidth 
glid = [0] * ( h+ 2)

h_index = [-1, 0, 0,  1]
w_index = [ 0, -1, 1, 0]



glid[0]=["."] * ( w + 2 )
glid[h + 1 ] = ["."] * ( w + 2 )

for i in range(h):
	temp1 = ["."]
	temp2 = list(input())
	temp1.extend(temp2)
	temp1.append(".")
	glid[ i + 1 ] = temp1

# get glids 

cnt = 0

for j in range(h):
	for k in range(w):
		if glid[ j + 1 ][ k + 1 ] == ".":
			continue
		else:
			flg = False
			for n in range(4):
				if glid[ j  + 1 + h_index[ n ] ][ k + 1 + w_index[ n ]] == "#" :
					flg = True
					break
				cnt += 1
			if flg == False :
				break
	if flg == False :
		break

if cnt<0:
	print("Yes")
else:
	print("No")


Fixed submission:
h,w = map(int, input().split())
#get hight and weidth 
glid = [0] * ( h+ 2)

h_index = [-1, 0, 0,  1]
w_index = [ 0, -1, 1, 0]



glid[0]=["."] * ( w + 2 )
glid[h + 1 ] = ["."] * ( w + 2 )

for i in range(h):
	temp1 = ["."]
	temp2 = list(input())
	temp1.extend(temp2)
	temp1.append(".")
	glid[ i + 1 ] = temp1

# get glids 

cnt = 0

for j in range(h):
	for k in range(w):
		if glid[ j + 1 ][ k + 1 ] == "#" and glid[ j ][ k + 1 ] == "." and glid[ j + 2 ][ k + 1 ] == "." and glid[ j + 1][ k  ] == "." and glid[ j + 1][ k +2 ] == "." :
			cnt += 1

if cnt > 0 :
	print("No")
else:
	print("Yes")

Buggy python submission (verdict: Runtime Error):
h,w = map(int, input().split())
#get hight and weidth 
glid = [0] * ( h+ 2)

h_index = [-1, 0, 0,  1]
w_index = [ 0, -1, 1, 0]



glid[0]=["."] * ( w + 2 )
glid[h + 1 ] = ["."] * ( w + 2 )

for i in range(h):
	temp1 = ["."]
	temp2 = list(input())
	temp1.extend(temp2)
	temp1.append(".")
	glid[ i + 1 ] = temp1

# get glids 

cnt = 0

for j in range(h):
	for k in range(w):
		if glid[ j + 1 ][ k + 1 ] == ".":
			continue
		else:
			flg = False
			for n in range(4):
				if glid[ j  + 1 + h_index[ n ] ][ k + 1 + w_index[ n ]] == "#" :
					flg = True
					break
				cnt += 0
			if flg == False :
				break
	if flg == False :
		break

if cnt < 1:
	print("Yes")
else:
	print("No")


Fixed submission:
h,w = map(int, input().split())
#get hight and weidth 
glid = [0] * ( h+ 2)

h_index = [-1, 0, 0,  1]
w_index = [ 0, -1, 1, 0]



glid[0]=["."] * ( w + 2 )
glid[h + 1 ] = ["."] * ( w + 2 )

for i in range(h):
	temp1 = ["."]
	temp2 = list(input())
	temp1.extend(temp2)
	temp1.append(".")
	glid[ i + 1 ] = temp1

# get glids 

cnt = 0

for j in range(h):
	for k in range(w):
		if glid[ j + 1 ][ k + 1 ] == "#" and glid[ j ][ k + 1 ] == "." and glid[ j + 2 ][ k + 1 ] == "." and glid[ j + 1][ k  ] == "." and glid[ j + 1][ k +2 ] == "." :
			cnt += 1

if cnt > 0 :
	print("No")
else:
	print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b = map (int,input().sp;it())
print((a + b)//2)

Fixed submission:
a,b = map (int,input().split())
print(-((-a - b)//2))
Buggy python submission (verdict: Runtime Error):
k,s = map(int ,input()split())
cnt =0
for x in range(s+1):
	for y in range(s+1):
		z = s - x- y
		if z <= k and 0 <= z:
			cnt += 1

print(cnt)

Fixed submission:
k,s = map(int ,input().split())
cnt =0
for x in range(k+1):
	for y in range(k+1):
		z = s - x- y
		if z <= k and 0 <= z:
			cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,x =map( int, input().split() )

cnt = 0
for i in range(a,b+1):
	if i % x == 0:
		cnt += 1

print(cnt)

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

cnt = 0

start  = ( a - 1) // x
end = b// x 

print(end - start)
Buggy python submission (verdict: Runtime Error):
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
print(l[int(input())])


Fixed submission:
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
n=int(input())
print(l[n-1])

Buggy python submission (verdict: Runtime Error):
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
print(l[int(input())+1])

Fixed submission:
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
n=int(input())
print(l[n-1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=list()
if n<=5:
  print("Yes")
  exit()
for i in range(2, n//2+1):
    if n % i == 0: 
        if (n//i,i) not in l:
            l.append((i,n//i))
flag=0
for i in l:
    if i[0]<=9 and i[1]<=9:
        flag=1
        print("Yes")
        exit()
if not flag:
    print("No")


Fixed submission:
a,b=map(int,input().split(' '))
count=0
if (a<=9 and a>=1) and (b<=9 and b>=1) :
    print(a*b)
else:
    print("-1")
Buggy python submission (verdict: Runtime Error):
N, K = map(int, open(0).read().split())
a = N % K
print(min(K - b, b))


Fixed submission:
N, K = map(int, open(0).read().split())
a = N % K
print(min(K - a, a))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
if N <= 1:
  N = 2
if M <= 1:
  M = 2
print(N(N-1)/2+M(M-1)/2)

Fixed submission:
N,M = map(int,input().split())
if N <= 1:
  N = 1
if M <= 1:
  M = 1
print(int(N*(N-1)/2+M*(M-1)/2))
Buggy python submission (verdict: Runtime Error):
print(int("a"))

Fixed submission:
print(chr(ord(input())+1))
Buggy python submission (verdict: Runtime Error):
A,B = int(input())
if (A < 10) and (B < 10):
  print(A*B)
else:
  print(-1)

Fixed submission:
A,B = map(int, open(0).read().split())
if (A < 10) and (B < 10):
  print(A*B)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
import numpy as np

N, K, Q, *A, = map(int,map(lambda x: ''.join(sorted(x)), open(0).read().split()))
P = np.zeros(N)
for i in A:
    P[i - 1] += 1
for j in P:
    if K <= Q - j:
        print("No")
    else:
        print("Yes")

Fixed submission:
import numpy as np

N, K, Q, *A, = map(int, open(0).read().split())
P = np.zeros(N)
for i in A:
    P[i - 1] += 1
for j in P:
    if K <= Q - j:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
N=int(input())
Ai = list(map(int,input().split()))
Bi = list(map(int,input().split()))
Ci = list(map(int,input().split()))

ans ~ sum(Bi)

for i in range(N-1):
  if Ai[i] + 1 == Ai[i+1]:
    ans += Ci[Ai[i]-1]

print(ans)

Fixed submission:
N=int(input())
Ai = list(map(int,input().split()))
Bi = list(map(int,input().split()))
Ci = list(map(int,input().split()))

ans = sum(Bi)

for i in range(N-1):
  if Ai[i] + 1 == Ai[i+1]:
    ans += Ci[Ai[i]-1]

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
M,D = map(int,input().split())
a = 0
for i in np.arange(1,D+1):
	d10 = int(i/10)
	d01 = i-d10*10
    if 0 < d10*d01 and d10*d01 <= M:
    	a += 1
print(a)

Fixed submission:
import numpy as np
M,D = map(int,input().split())
a = 0
for i in np.arange(22,D+1):
  d10 = int(i/10)
  d01 = i-d10*10
  if d01 <= 1:
    continue
  if 0 < d10*d01 and d10*d01 <= M:
    a += 1
print(a)
Buggy python submission (verdict: Runtime Error):
k,x = map(int,input().split())
list=[x-(k-1)+i for i in range(2*k-1)]
print(' '.join(list))

Fixed submission:
k,x = map(int,input().split())
L=[x-(k-1)+i for i in range(2*k-1)]
print(' '.join(map(str, L)))