Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
(N, K, Q) = map(int, list(input().split()))

A = list(map(int,[input() for i in range(Q)]))
for y in range(1, N+1):
    if K - Q + A.count(y) > 0:
        print("Yes")
    else:
        print("No")


Fixed submission:
(N, K, Q) = map(int, list(input().split()))

points = []
for x in range(N):
    points.append(K-Q)

for y in range(Q):
    ansed = int(input()) - 1
    points[ansed] += 1

for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
(N,K,Q) = map(int,list(input().split()))
ansed = []
for x in range(0,Q):
    ansed.append(int(input()))
for y in range(1,N+1):
    if K - Q + ansed.count(y) > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
(N, K, Q) = map(int, list(input().split()))

points = []
for x in range(N):
    points.append(K-Q)

for y in range(Q):
    ansed = int(input()) - 1
    points[ansed] += 1

for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
ansed = []
for x in range(0,Q):
    ansed.append(int(input()))
for y in range(1,N+1):
    if K - Q + ansed.count(y) > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
(N, K, Q) = map(int, list(input().split()))

points = []
for x in range(N):
    points.append(K-Q)

for y in range(Q):
    ansed = int(input()) - 1
    points[ansed] += 1

for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
(N,K,Q) = map(int,list(input().split()))
points = []
for x in range(0,N):
    points.append(K)
for y in range(0,Q):
    seikaisha = int(input()) - 1
    for z in range(0,N):
            if z == seikaisha:
                continue
            else:
                points[z] -= 1        
for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
(N, K, Q) = map(int, list(input().split()))

points = []
for x in range(N):
    points.append(K-Q)

for y in range(Q):
    ansed = int(input()) - 1
    points[ansed] += 1

for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if(a<10 and b<10):
    print(a*b)
else:
    print(-1)

Fixed submission:
a=list(map(int,input().split()))
if(a[0]<10 and a[1]<10):
    print(a[0]*a[1])
else:
    print(-1)

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

if data[0] < 10:
  if data[1] < 10:
    answer = data[0]*data[1]
    
return answer

Fixed submission:
data = list(map(lambda x: int(x), input().split()))
     
if __name__ == "__main__":
  if data[0] < 10:
    if data[1] < 10:
      answer = data[0]*data[1]
    else:
      answer = -1
  else:
    answer = -1
    
  print(answer)
Buggy python submission (verdict: Runtime Error):
print(r**2*3)

Fixed submission:
r = int(input())

print(r**2*3)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
           
for j in range(n):
    print(max(l[:j]+l[j+1:]))  

Fixed submission:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
           
s = sorted(l, reverse=True)
      
for value in l:
    if value == s[0]:
        print(s[1])
    else:
        print(s[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
    print(max(l[:j]+l[j+1:]))  

Fixed submission:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
           
s = sorted(l, reverse=True)
      
for value in l:
    if value == s[0]:
        print(s[1])
    else:
        print(s[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
    print(max(l[:i]+l[i+1:]))        

Fixed submission:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
           
s = sorted(l, reverse=True)
      
for value in l:
    if value == s[0]:
        print(s[1])
    else:
        print(s[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input())
           
for j in range(n):
	print(max(l[:i]+l[i+1:]))        

Fixed submission:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
           
s = sorted(l, reverse=True)
      
for value in l:
    if value == s[0]:
        print(s[1])
    else:
        print(s[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
S = input()
b = 0
w = S.count('.')
res = w
for s in S:
	if s == '.':
		w -= 1
	else:
		b += 1
	res = min(res,b+w)
print(res)
	

Fixed submission:
a, b, c = map(int, input().split())
ans = "No"
if a < c and c < b or b < c and c < a:
    ans = "Yes"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x, y, z, k = map(int, input().split())
a = list(int(i) for i in input().split())
b = list(int(i) for i in input().split())
c = list(int(i) for i in input().split())

sums = []

for i in range(x):
    for j in range(y):
        for l in range(z):
            sums.append(a[i] + b[j] + c[l])
sums.sort()
ans = sums[::-1]

for i in range(k):
    print(ans[i])


Fixed submission:
x, y, z, k = map(int, input().split())
A = list(int(i) for i in input().split())
B = list(int(i) for i in input().split())
C = list(int(i) for i in input().split())

A.sort()
A = A[::-1]
B.sort()
B = B[::-1]
C.sort()
C = C[::-1]

ABC = []

for a in range(len(A)):
    for b in range(len(B)):
        if (a+1)*(b+1) > k:
            break
        for c in range(len(C)):
            if (a+1)*(b+1)*(c+1) > k:
                break
            #print(A[a], B[b], C[c])
            ABC.append(A[a]+B[b]+C[c])

ABC.sort()
ABC = ABC[::-1]

for i in range(k):
    print(ABC[i])
Buggy python submission (verdict: Runtime Error):
n = int(input())
 
for i in range(1,10):
  if(n%i == 0 and n/i <10):
    print('Yes')
    break
else:
  print('No')

Fixed submission:
a, b = map(int, input().split())
if(a>9 or b>9):
  print('-1')
else:
  print(a*b)
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())

sqrt_n = int(math.sqrt(n))

for i in reversed(range(sqrt_n)):
  if(n%i == 0):
    print(i + n%i -2)

Fixed submission:
import math
 
n = int(input())
 
sqrt_n = int(math.sqrt(n))
 
for i in reversed(range(sqrt_n+1)):
  if(n%i == 0):
    print(i+int(n/i)-2)
    break
Buggy python submission (verdict: Runtime Error):
Welcome to fish, the friendly interactive shell
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py 
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
kuwanakengo@kuwanakengonoMacBook ~/python> 
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py 3
10 40 70
20 50 80
30 60 90
fish: Unknown command 10
fish: 
10 40 70
^
fish: Unknown command 20
fish: 
20 50 80
^
fish: Unknown command 30
fish: 
30 60 90
^
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
  File "test2.py", line 17
    dp[i][j] = max(dp[i-1][0], dp[i-1][1)+A[i][j]
                                        ^
SyntaxError: invalid syntax
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
3
[[10, 40, 70], [20, 50, 80], [30, 60, 90]]
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
Traceback (most recent call last):
  File "test2.py", line 18, in <module>
    print(mas(dp[n]))
NameError: name 'mas' is not defined
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
Traceback (most recent call last):
  File "test2.py", line 18, in <module>
    print(max(dp[n]))
IndexError: list index out of range
kuwanakengo@kuwanakengonoMacBook ~/python> 
python3 test2.py
3
10 40 70
20 50 80
30 60 90
[[10, 40, 70], [90, 120, 120], [150, 180, 210]]
kuwanakengo@kuwanakengonoMacBook ~/python> python3 test2.py
3
10 40 70
20 50 80
30 60 90
210
kuwanakengo@kuwanakengonoMacBook ~/python> 

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


dp = [['' for i in range(3)] for j in range(n)]
for i in range(n):
    if(i == 0):
        dp[i] = A[i]
        continue
    for j in range(3):
        if(j ==0):
            dp[i][j] = max(dp[i-1][1], dp[i-1][2])+A[i][j]
        elif(j ==1):
            dp[i][j] = max(dp[i-1][0], dp[i-1][2])+A[i][j]
        elif(j ==2):
            dp[i][j] = max(dp[i-1][0], dp[i-1][1])+A[i][j]

print(max(dp[n-1]))
Buggy python submission (verdict: Runtime Error):
N = input()

if(N = 25) : 
	print("Christmas")
if(N = 24) : 
	print("Christmas Eve")
if(N = 23) : 
	print("Christmas Eve Eve")
if(N = 22) : 
	print("Christmas Eve Eve Eve")



Fixed submission:
N= input()
 
if(N == "25") : 
	print('Christmas')
if(N == "24") : 
	print("Christmas Eve")
if(N == "23") : 
	print("Christmas Eve Eve")
if(N == "22") : 
	print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
N = input()

if N  == 1:
  print("Hello World")
else:
  a = input()
  b = input()
  print(a + b)

Fixed submission:
N = int(input())

if N  == 1:
  print("Hello World")
else:
  a = int(input())
  b = int(input())
  print(str(a + b))
Buggy python submission (verdict: Runtime Error):
s=list(input())


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))

Fixed submission:
s=list(input())


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

s = ''.join(s)


print(s)

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

int a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  else s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))

Fixed submission:
s=list(input())


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

s = ''.join(s)


print(s)

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

int a
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  else s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))

Fixed submission:
s=list(input())


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

s = ''.join(s)


print(s)
Buggy python submission (verdict: Runtime Error):
A, B = map(int,input().sprit())

if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')


Fixed submission:
A, B = map(int, input().split())
 
if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')

Buggy python submission (verdict: Runtime Error):
A, B = map(int(input().sprit()))

if (A * B) % 2 == 0 :
  print('no')
else :
  print('yes')


Fixed submission:
A, B = map(int, input().split())
 
if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')

Buggy python submission (verdict: Runtime Error):
A, B = map(int(input().sprit())

if (A * B) % 2 == 0 :
  print('no')
else :
  print('yes')


Fixed submission:
A, B = map(int, input().split())
 
if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')

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

if (A * B) % 2 == 0 :
  print('no')
else :
  print('yes')


Fixed submission:
A, B = map(int, input().split())
 
if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')

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

if (a * b) % 2 == 0 :
  print('yes')
else :
  print('no')

Fixed submission:
A, B = map(int, input().split())
 
if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

S = A - 2B
if S > 0:
    print(S)
else:
    print(0)

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

S = A - 2*B
if S > 0:
    print(S)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
a,b = int(x) for x in input().split()
if a > 0 and a < 10:
    if b > 0 and b < 10:
        print(a*b)
     else:
         print(-1)
else:
    print(-1)

Fixed submission:
a,b = (int(x) for x in input().split())
if a > 0 and a < 10:
    if b > 0 and b < 10:
        print(a*b)
    else:
         print(-1)
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
MIN = n
x = 1
while np.sqrt(n) >= x:
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
    x += 1
print(int(MIN))

Fixed submission:
import numpy as np
n = int(input())
MIN = n
for x in range(1,int(np.sqrt(n)+1)):
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
print(int(MIN))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
MIN = n
x = 1
while np.sqrt(n) >= x:
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
    x += 1
print(int(MIN))

Fixed submission:
import numpy as np
n = int(input())
MIN = n
for x in range(1,int(np.sqrt(n)+1)):
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
print(int(MIN))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
MIN = n
x = 1
while np.sqrt(n) >= x:
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
    x += 1
print(int(MIN))

Fixed submission:
import numpy as np
n = int(input())
MIN = n
for x in range(1,int(np.sqrt(n)+1)):
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
print(int(MIN))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
min = n
for x in range(1,n+1):
    if n % x == 0:
        if min > ((x-1) + (n/x - 1)):
            min = ((x-1) + (n/x - 1))
print(int(min))

Fixed submission:
import numpy as np
n = int(input())
MIN = n
for x in range(1,int(np.sqrt(n)+1)):
    if n % x == 0:
        MIN = min([MIN,x + n/x - 2])
print(int(MIN))
Buggy python submission (verdict: Runtime Error):
８N = int(input())
A = []#生徒たちが出席した順番
rev = [0]*N #早く来た順の生徒の番号

for x in input().split():
    A.append(int(x))

for i in range(N):
    rev[A[i]-1] = i+1

print(' '.join(map(str,rev)))

Fixed submission:
N = int(input())
A = []#生徒たちが出席した順番
rev = [0]*N #早く来た順の生徒の番号

for x in input().split():
    A.append(int(x))

for i in range(N):
    rev[A[i]-1] = i+1

print(' '.join(map(str,rev)))

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = []#生徒たちが出席した順番
rev = [0]*N #早く来た順の生徒の番号

i = 0
for x in input().split():
    i += 1
    A.append(int(x))
    students.append(int(i))

for i in range(N):
    rev[A[i]-1] = i + 1

print(' '.join(map(str,rev)))

Fixed submission:
N = int(input())
A = []#生徒たちが出席した順番
rev = [0]*N #早く来た順の生徒の番号

for x in input().split():
    A.append(int(x))

for i in range(N):
    rev[A[i]-1] = i+1

print(' '.join(map(str,rev)))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []#生徒たちが出席した順番
students = []#生徒たちの番号
rank_sort = []#出席した順の生徒たちの番号

i = 0
for x in input().split():
    i += 1
    A.append(int(x))
    students.append(int(i))

rank = 1
n = N
for i in range(N):
    for j in range(n):
        if A[j] == rank:
            rank_sort.append(students[j])
            del A[j]
            del students[j]
            break
    rank += 1
    n -= 1
print(' '.join(map(str,rank_sort)))

Fixed submission:
N = int(input())
A = []#生徒たちが出席した順番
rev = [0]*N #早く来た順の生徒の番号

for x in input().split():
    A.append(int(x))

for i in range(N):
    rev[A[i]-1] = i+1

print(' '.join(map(str,rev)))
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = (int(x) for x in input().split())
#参加者全員分の残りポイントが入ったリスト[3,3,3,3,3,3]を作る
point = []
for i in range(N):
    point.append(K)
#正解者の入力に応じてpointを減らしていく[3,3,3,3,3,3]→[2,2,3,2,2,2]
for i in range(Q):
    currect_person = int(input())
    for j in range(N):
        if j != currect_person-1:
            point[j] -= 1
    #print(point)

for i in range(N):
    if point[i] <= 0:
        print("No")
    else:
        print("Yes")

Fixed submission:
N,K,Q = (int(x) for x in input().split())
#参加者全員分の残りポイントが入ったリスト[3,3,3,3,3,3]を作る
point = []
for i in range(N):
    point.append(K)
#N人のポイントをはじめに全員分-Qしておく
for i in range(N):
    point[i] -= Q
#正解者ごとに+1する
for i in range(Q):
    point[int(input())-1] += 1
#結果を出力
for i in range(N):
    if point[i] <= 0:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if len(prime_factorize(n)) == 1:
  print(n - 1)
  exit()

ret = None
min_r = n
for x in range(1, int( n / 2)):
  q, mod = divmod(n, x)
  _min_r = (2 * x - 2) + (q - x)
  if mod == 0 and min_r > _min_r:
    min_r = _min_r
    ret = (x, q)

print(min_r)

Fixed submission:
n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if len(prime_factorize(n)) == 1:
  print(n - 1)
  exit()

ret = None
min_r = n
for x in range(2, int( n / 2)):
  q, mod = divmod(n, x)
  _min_r = (2 * x - 2) + (q - x)
  if mod == 0 and min_r > _min_r:
    min_r = _min_r
    ret = (x, q)
  
  if x > q:
    break

print(min_r)
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)

divide=2
ans=1
while(g!=1 and g!=0):
	if g%divide==0:
		ans+=1
		while(g%divide==0 and g!=0):
			g//=divide
	divide+=1
print(ans)

Fixed submission:
from math import sqrt
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
ans=1
if g%2==0:
	ans+=1
	while(g%2==0):
		g//=2
for divide in range(3,int(sqrt(g))+1,2):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
if g>2:
	ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)

divide=2
ans=1
while(g!=1 and g>=divide):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
	divide+=1
print(ans)

Fixed submission:
from math import sqrt
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
ans=1
if g%2==0:
	ans+=1
	while(g%2==0):
		g//=2
for divide in range(3,int(sqrt(g))+1,2):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
if g>2:
	ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
divide=2

ans=1
while(g!=1):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
	divide+=1
print(ans)

Fixed submission:
from math import sqrt
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
ans=1
if g%2==0:
	ans+=1
	while(g%2==0):
		g//=2
for divide in range(3,int(sqrt(g))+1,2):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
if g>2:
	ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
divide=2

ans=1
while(g!=1):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
	else:
		divide+=1
print(ans)

Fixed submission:
from math import sqrt
def gcd(a,b):
	if a==0:
		return(b)
	return(gcd(b%a,a))
a,b=map(int,input().split())
g=gcd(a,b)
ans=1
if g%2==0:
	ans+=1
	while(g%2==0):
		g//=2
for divide in range(3,int(sqrt(g))+1,2):
	if g%divide==0:
		ans+=1
		while(g%divide==0):
			g//=divide
if g>2:
	ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()

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

def main():
#    a = int(sys.argv[1])
#    b = int(sys.argv[2])
#    c = int(sys.argv[3])
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()

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

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    c = int(sys.argv[3])
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()

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

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    c = int(sys.argv[3])
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
X, A = map(int, input.split());
if X < A:
  print(0);
else:
  print(10);

Fixed submission:
X, A = map(int, input().split());
if X < A:
    print(0);
else:
    print(10);
Buggy python submission (verdict: Runtime Error):
N,K,Q = map(int,input().split())

min_c = Q - K + 1

num = [0]*N

for i in range(Q):
    a = int(input())
    num[a-1]+=1

for j in num:
    if num[j] >= min_c:
        print('Yes')
    else:
        print('No')


Fixed submission:
N,K,Q = map(int,input().split())

min_c = Q - K + 1

num = [0]*N

for i in range(Q):
    a = int(input())
    num[a-1]+=1

for j in num:
    if j >= min_c:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,K,Q = map(int,input().split())

num = np.array([K]*N)


for i in range(Q):
    a = int(input())
    num[0:a-1]-=1
    num[a:]-=1    

for j in num:
    if j > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
N,K,Q = map(int,input().split())

min_c = Q - K + 1

num = [0]*N

for i in range(Q):
    a = int(input())
    num[a-1]+=1

for j in num:
    if j >= min_c:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
B = input()

happy = 0
for n in range(N - 1):
     if B[n] == B[n + 1]:
            happy += 1

print(N -1 if happy + K*2 > n-1 else happy + K*2)
    

Fixed submission:
N,K = map(int,input().split(' '))
S = list(input())

first = S[0]
flg = False
for index in range(1,N):
    if S[index] == first and flg:
        flg = False
        K -= 1
    elif S[index] != first:
        S[index] = first
        flg = True
    
    if K == 0:
        break
 
count = 0
for index in range(1,N):
    if S[index] == S[index -1]:
        count += 1
    

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

a = int(input())

print(np.array(range(a)).sum())

Fixed submission:
from decimal import *
a = int(input())

print(int(Decimal((a -1)/2)*Decimal(a)))

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())

sum = 0
for i in range(a):
    sum += i
print(sum)

Fixed submission:
from decimal import *
a = int(input())

print(int(Decimal((a -1)/2)*Decimal(a)))