Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
def main(input_str):
    nums = list(map(int, input_str.split()))

    count = 0
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            for num_3 in range(nums[0]+1):
                result = num_1 + num_2 + num_3
                if result == nums[1]:
                    count += 1

    return count


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))


Fixed submission:
def main(input_str):
    nums = list(map(int, input_str.split()))

    count = 0
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            if 0 <= nums[1]-(num_1+num_2) <= nums[0]:
                count += 1

    return count


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))

Buggy python submission (verdict: Time Limit Exceeded):
def main(input_str):
    nums = list(map(int, input_str.split()))

    result_list = []
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            for num_3 in range(nums[0]+1):
                result = num_1 + num_2 + num_3
                if result == nums[1]:
                    result_list.append(result)

    return len(result_list)


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))


Fixed submission:
def main(input_str):
    nums = list(map(int, input_str.split()))

    count = 0
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            if 0 <= nums[1]-(num_1+num_2) <= nums[0]:
                count += 1

    return count


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))

Buggy python submission (verdict: Time Limit Exceeded):
def main(input_str):
    nums = list(map(int, input_str.split()))

    result_list = []
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            for num_3 in range(nums[0]+1):
                result = num_1 + num_2 + num_3
                if result == nums[1]:
                    result_list.append(result)

    return len(result_list)


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))


Fixed submission:
def main(input_str):
    nums = list(map(int, input_str.split()))

    count = 0
    for num_1 in range(nums[0]+1):
        for num_2 in range(nums[0]+1):
            if 0 <= nums[1]-(num_1+num_2) <= nums[0]:
                count += 1

    return count


if __name__ == "__main__":
    input_str = input()
    print(main(input_str))
Buggy python submission (verdict: Runtime Error):
import math
def main():
	s = str(input())
	l = s.split()
	x = int(l[0])
	k = int(l[1])
	d = int(l[2])
	value = x - k * d
	ans = x + k * d
	be = 0
	en = k
	while (be <= en):
	    mid = (be + en) // 2
	    diff = 2 * mid * d
	    if ((value + diff) >= 0):
	        ans = value + diff
	        en = mid - 1
	    else:
	        be = mid + 1

	ans2 = value
	be = 0
	en = k
	while (be <= en):
		mid = (be + en) / 2
		diff = 2 * mid * d
		if ((value + diff) < 0):
		    ans2 = value + diff
		    be = mid + 1
		else:
		    en = mid - 1
	print(int(min(abs(ans), abs(ans2))))	



if __name__ == '__main__':
	main()



Fixed submission:
import math
def main():
	s = raw_input()
	l = s.split()
	x = int(l[0])
	k = int(l[1])
	d = int(l[2])
	value = x - k * d
	ans = x + k * d
	be = 0
	en = k
	while (be <= en):
	    mid = (be + en) // 2
	    diff = 2 * mid * d
	    if ((value + diff) >= 0):
	        ans = value + diff
	        en = mid - 1
	    else:
	        be = mid + 1

	ans2 = value
	be = 0
	en = k
	while (be <= en):
		mid = (be + en) / 2
		diff = 2 * mid * d
		if ((value + diff) < 0):
		    ans2 = value + diff
		    be = mid + 1
		else:
		    en = mid - 1
	print(int(min(abs(ans), abs(ans2))))	



if __name__ == '__main__':
	main()
Buggy python submission (verdict: Runtime Error):
n = input()
s = raw_input()
if(n%2==1):
 	print "No"
else:
	if(s[0:n/2]==s[n/2:n]):
		print "Yes"
  	else:
    	print "No"

Fixed submission:
n = input()
s = raw_input()
if(n%2==1):
	print "No"
else:
	if(s[0:n/2]==s[n/2:n]):
		print "Yes"
	else:
  		print "No"
Buggy python submission (verdict: Runtime Error):
iko

Fixed submission:
m=input()
print (48-m)
Buggy python submission (verdict: Runtime Error):
def main():
  N = int(input())
  A = list(map(int,input().split()))
  ans = 0
  for i in range(1,N):
    sub = A[i-1] - A[i]
    if sub > 0:
      A[i]+=sub
      ans+=sub
  print(sub)
  return
main()

Fixed submission:
def main():
  N = int(input())
  A = list(map(int,input().split()))
  ans = 0
  for i in range(1,N):
    sub = A[i-1] - A[i]
    if sub > 0:
      A[i]+=sub
      ans+=sub
  print(ans)
  return
main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(1,N):
  sub = A[i-1] - A[i]
  if sub > 0:
    ans+=sub
print(sub)

Fixed submission:
def main():
  N = int(input())
  A = list(map(int,input().split()))
  ans = 0
  for i in range(1,N):
    sub = A[i-1] - A[i]
    if sub > 0:
      A[i]+=sub
      ans+=sub
  print(ans)
  return
main()
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
a = 7
ans = -1
for i in range(1,10**6+1):
  if a%K==0:
    ans = i
    break
  a = a*10+7
print(ans)

Fixed submission:
K = int(input())
a = 7%K
ans = -1
for i in range(1,10**6+1):
  if a==0:
    ans = i
    break
  a = (a*10+7)%K
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
C = input()
A = []
for c in C:
    if c=='W':
        A.append(0)
    else:
        A.append(1)
l = 0
r = N - 1
ans = 0
while l < r:
    if not A[l] and A[r]:
        ans+=1
        l +=1
        r-=1
    elif not A[l]:
        r-=1
    elif A[r]:
        l+=1
print(ans)

Fixed submission:
N = int(input())
C = input()

r = C.count('R')
ans = C[:r].count('W')
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
C = input()
l = 0
r = N - 1
ans = 0
while l < r:
    if C[l]=='W' and C[r]=='R':
        ans+=1
        l +=1
        r-=1
    elif C[l]=='W':
        r-=1
    elif C[r]=="R":
        l+=1
print(ans)

Fixed submission:
N = int(input())
C = input()

r = C.count('R')
ans = C[:r].count('W')
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, N = map(int, input().split())
x = min(N,B-1)
return A*x//B-A*(x//B)

Fixed submission:
A, B, N = map(int, input().split())
x = min(N,B-1)
print(A*x//B-A*(x//B))
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  N, K = map(int,input().split())
  sett = set()
  ans = float('inf')
  if N%K==0:
    print(0)
    return
  while N not in sett:
    sett.add(N)
    N = abs(N-K)
    ans = min(ans,N)
  print(ans)
  return 
main()

Fixed submission:
def main():
  N, K = map(int,input().split())
  print(min(N%K, K-N%K))
  return 
main()

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
sett = set()
ans = float('inf')
while N not in sett:
  sett.add(N)
  N = abs(N-K)
  ans = min(ans,N)
print(ans)

Fixed submission:
def main():
  N, K = map(int,input().split())
  print(min(N%K, K-N%K))
  return 
main()

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
setlist = set()
tmp = N
ans = N
setlist.add(tmp)
while True:
  tmp = abs(tmp-K)
  ans = min(tmp,ans)
  if tmp in setlist:
    break
  setlist.add(tmp)
print(ans)



Fixed submission:
def main():
  N, K = map(int,input().split())
  print(min(N%K, K-N%K))
  return 
main()

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
setlist = set()
tmp = N
ans = float('inf')
while True:
  tmp = abs(N-K)
  ans = min(tmp,ans)
  if tmp in setlist:
    break
  setlist.add(tmp)
return ans

Fixed submission:
def main():
  N, K = map(int,input().split())
  print(min(N%K, K-N%K))
  return 
main()
Buggy python submission (verdict: Runtime Error):
from collections import deque
K = int(input())
queue = deque([1,2,3,4,5,6,7,8,9])
count = 1
while count <= K:
  num = queue.popleft()
  if num%10!=0:
    queue.append(num*10+num%10-1)
  queue.append(num*10+num%10)
  if num%!=9:
    queue.append(num*10+num%10+1)
  
print(num)

Fixed submission:
from collections import deque
K = int(input())
queue = deque([1,2,3,4,5,6,7,8,9])
count = 1
while count <= K:
  num = queue.popleft()
  if num%10!=0:
    queue.append(num*10+num%10-1)
  queue.append(num*10+num%10)
  if num%10!=9:
    queue.append(num*10+num%10+1)
  count+=1
  
print(num)
Buggy python submission (verdict: Time Limit Exceeded):
X, Y, A, B, C = map(int, input().split())
red = list(map(int, input().split()))
green = list(map(int, input().split()))
no = list(map(int, input().split()))

red = sorted(red, reverse=True)[:X]
green = sorted(green, reverse=True)[:Y]
no = sorted(no, reverse = True)[:X+Y]

for i in range(len(no)):
    minX = min(red)
    minY = min(green)
    
    if no[i]>minX or no[i]>minY:
        if minX<=minY:
            red[red.index(minX)] = no[i]
        else:
            green[green.index(minY)] = no[i]
    else:
        break
        
print(sum(red)+sum(green))

Fixed submission:
X, Y, A, B, C = map(int, input().split())
red = list(map(int, input().split()))
green = list(map(int, input().split()))
no = list(map(int, input().split()))

red = sorted(red, reverse=True)[:X]
green = sorted(green, reverse=True)[:Y]
no = sorted(no, reverse = True)[:X+Y]

co = sorted(red+green)

for i in range(len(no)):
    if no[i]>co[i]:
        co[i] = no[i]
    else:
        break
        
print(sum(co))
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
K = list(map(int,input().split()))
hashmap = {}
for k in K:
  if k not in hashmap:
    hashmap[k] = 0
  hashmap[k]+=1
total = 0
for v in hashmap.values():
  total+=math.factorial(v) // (math.factorial(v - 2) * 2)

for k in K:
  print(total-(hashmap[k]-1))

Fixed submission:
import math
N = int(input())
K = list(map(int,input().split()))
hashmap = {}
for k in K:
  if k not in hashmap:
    hashmap[k] = 0
  hashmap[k]+=1
total = 0
for v in hashmap.values():
  if v>=2:
  	total+=math.factorial(v) // (math.factorial(v - 2) * 2)

for k in K:
  print(total-(hashmap[k]-1))
Buggy python submission (verdict: Runtime Error):
N = int(input())
hashmap = {}
Array = [[] for _ in range(N+1)]
for _ range(N):
  st = input()
  if st not in hashmap:
    hashmap[st] = 0
  hashmap[st]+=1
max_num = max(hashmap.values())
hashmap.sort()
for k,v in hashmap.items():
  if v == max_num:
    print(k)

Fixed submission:
N = int(input())
hashmap = {}
Array = [[] for _ in range(N+1)]
for _ in range(N):
  st = input()
  if st not in hashmap:
    hashmap[st] = 0
  hashmap[st]+=1
max_num = max(hashmap.values())
tup = []
for k,v in hashmap.items():
  if v == max_num:
    tup.append(k)
tup.sort()
for i in tup:
  print(i)
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    List = list(map(int,input(),split()))
    Set = set()
    for i in List:
      if i in Set:
        print('No')
        return
      Set.add(i)
	print('Yes')
main()

Fixed submission:
def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return
main()
Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
P = list(map(int,input().split()))
prev = 0
for i in range(N):
  p = P[i]
  p = (1+p)//2
  P[i] = prev+p
  prev+=p
ans = 0
for i in range(N-K+1):
  ans = max(ans,P[i+K]-P[i])
print(ans)
  

Fixed submission:
N, K = map(int,input().split())
P = [0]+list(map(int,input().split()))
for i in range(1,N+1):
  p = P[i]
  p = (1+p)/2
  P[i] = p+P[i-1]
ans = 0
for i in range(N-K+1):
  ans = max(ans,P[i+K]-P[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(int, L)))

Fixed submission:
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(str, L)))

Buggy python submission (verdict: Runtime Error):
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10*9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(int, L)))

Fixed submission:
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(str, L)))

Buggy python submission (verdict: Runtime Error):
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  L.append(S+1)
  
print(' '.join(map(int, L)))

Fixed submission:
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(str, L)))

Buggy python submission (verdict: Runtime Error):
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  L.append(S+1)
  
print(' '.join(L))

Fixed submission:
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(str, L)))

Buggy python submission (verdict: Runtime Error):
N, K, S = map(int,input())
L = [S]*K
for i in range(N-K):
  L.append(S+1)
  
print(' '.join(L))

Fixed submission:
N, K, S = map(int,input().split())
L = [S]*K
for i in range(N-K):
  if S < 10**9:
  	L.append(S+1)
  else:
    L.append(1)
  
print(' '.join(map(str, L)))
Buggy python submission (verdict: Runtime Error):
H, W = map(int,input().split())
grid = [list(input().split()) for _ in H]
res = 0
def bfs(tup,visited):
  def helper(tup, total):
    if tup in visited():
      res = max(res, total)
    elif tup[0]>=H or tup[0] < 0 or tup[1]>=W or tup[1]<0 or grid[tup[0]][tup[1]]:
      res = max(res, total)
    else:
      visited.add(tup)
      h, w = tup
      helper((h+1, w),total+1)
      helper((h-1, w),total+1)
      helper((h, w-1),total+1)
      helper((h, w+1),total+1)
  helper(tup,0)
  return res
      
ans = 0
for h in H:
  for w in W:
    if grid[h][w] == '#':
      continue
    ans = max(ans,bfs((h,w),set()))
print(ans)

Fixed submission:
from collections import deque
import numpy as np

H,W = map(int,input().split())
maze = [input() for _ in range(H)]

ans = 0
for x in range(H):
    for y in range(W):
        #壁からはスタートできない
        if maze[x][y] == "#":
            continue

        distance = [[-1]*W for _ in range(H)]
        distance[x][y] = 0
        #start位置
        stack = deque([[x,y]])

        while stack:
            h,w = stack.popleft()
            for i,j in [[1,0],[-1,0],[0,1],[0,-1]]:
                new_h, new_w = h+i, w+j
                if new_h < 0 or new_w < 0 or new_h >= H or new_w >= W:
                    continue
                elif maze[new_h][new_w] != "#" and distance[new_h][new_w] == -1:
                    distance[new_h][new_w] = distance[h][w]+1
                    stack.append([new_h, new_w])

        ans = max(ans, np.max(distance))

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(range(1,N+1))
B = list(range(2,N+1))+[1]
ans = 0
for i in range(N):
  ans+=A[i]%B[i]
print(ans)

Fixed submission:
def main():
  N = int(input())
  if N==1:
    print(0)
    return
  ans = sum(range(1,N))
  print(ans)
main()
Buggy python submission (verdict: Runtime Error):
import numpy as np 
inf = 10**18
n = int(input())
A = list(map(int,input().split()))
S = np.prod(A)
if 0 in A:
	print(0)
    break
if S > inf:
	print("-1")
	break
print(S)

Fixed submission:
N = int(input())
*A, = map(int,input().split())
max = 10**18
ans = 1
if 0 in A:
    print(0)
    exit()
for i in range(N):
    ans *= A[i]
    if ans > max:
        print(-1)
        exit()
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np 
inf = 10**18
n = int(input())
A = list(map(int,input().split()))
S = np.prod(A)
if A > inf;
	print("-1")
  else:
    print(S)

Fixed submission:
N = int(input())
*A, = map(int,input().split())
max = 10**18
ans = 1
if 0 in A:
    print(0)
    exit()
for i in range(N):
    ans *= A[i]
    if ans > max:
        print(-1)
        exit()
print(ans)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
tes = [[-1]*N for i in range(N)]
for i in range(N):
    A = int(readline())
    for j in range(A):
        x,y = map(int,readline().rstrip().split())
        tes[i][x-1] = y

cnt = 0
for i in range(2**N):
    hon = [0]*N
    for j in range(N):
        if (i>>j)&1:
            hon[j] = 1
    flag = True
    for j in range(N):
        if hon[j]:
            for k in range(N):
                if tes[j][k] != hon[k]:
                    flag = False
                    break
        if not flag:
            break
    if flag:
        cnt = max(cnt,hon.count(1))
print(cnt)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

A,B,C = map(int,readline().rstrip().split())
if (A+B+C) <=21:
    print("win")
else:
    print("bust")
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
tes = [[] for i in range(N)]
for i in range(N):
    A = int(readline())
    for j in range(A):
        x,y = map(int,readline().rstrip().split())
        tes[i].append((x-1,y))

cnt = 0
for i in range(2**N):
    flag = True
    for j in range(N):
        if (i>>j)&1 == 1:
            for x,y in tes[j]:
                if (i>>x)&1 != y:
                    flag = False
                    break
    if flag:
        cnt = max(cnt,bin(i)[2:].count(1))
print(cnt)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
tes = [[-1]*N for i in range(N)]
for i in range(N):
    A = int(readline())
    for j in range(A):
        x,y = map(int,readline().rstrip().split())
        tes[i][x-1] = y #ここまでが入力

cnt = 0
for i in range(2**N):
    hon = [0]*N
    for j in range(N):
        if (i>>j)&1:
            hon[j] = 1 #全状態2**N通りを作っておく
    flag = True
    for j in range(N):
        if hon[j]:      #hon=1ならtesとの整合性を比較
            for k in range(N):
                if tes[j][k] == -1:
                    continue    #証言されていない部分は飛ばす
                if tes[j][k] != hon[k]:
                    flag = False
    if flag:
        cnt = max(cnt,hon.count(1))
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(0,1000):
    c = (i//100,(i//10)%10,i%10)
    f = 0
    for j in range(0,N):
        if int(S[j]) == int(c[f]):
            f += 1
        if f == 3:
            break
    if f == 3:
        count += 1
            
print(count)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(10):
    a = S.find(str(i))
    if a == -1: 
        continue
    for j in range(10):
        b = S.find(str(j),a+1)
        if b == -1: 
            continue
        for k in range(10):
            c = S.find(str(k),b+1)
            if c != -1: count +=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(0,1000):
    c = [i//100,(i//10)%10,i%10]
    f = 0
    for j in range(0,N):
        if int(S[j]) == int(c[f]):
            f += 1
        if f == 3:
            break
    if f == 3:
        count += 1
            
print(count)


Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(10):
    a = S.find(str(i))
    if a == -1: 
        continue
    for j in range(10):
        b = S.find(str(j),a+1)
        if b == -1: 
            continue
        for k in range(10):
            c = S.find(str(k),b+1)
            if c != -1: count +=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(0,1000):
    c = [i//100,(i//10)%10,i%10]
    f = 0
    for j in range(0,N):
        if int(S[j]) == int(c[f]):
            f += 1
        if f == 3:
            break
    if f == 3:
        count += 1
            
print(count)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = readline()
count = 0
for i in range(10):
    a = S.find(str(i))
    if a == -1: 
        continue
    for j in range(10):
        b = S.find(str(j),a+1)
        if b == -1: 
            continue
        for k in range(10):
            c = S.find(str(k),b+1)
            if c != -1: count +=1
print(count)
Buggy python submission (verdict: Runtime Error):
X=input()
if x in "753":
    print("YES")
else:
    print("NO")

Fixed submission:
X=input()
if X in "753":
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
X=input()
if x in "753";
    print("YES")
else;
    print("NO")

Fixed submission:
X=input()
if X in "753":
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
X-input()
if x in "753";
    print("YES")
else;
    print("NO")


Fixed submission:
X=input()
if X in "753":
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a,b,c = sorted(map(int,readline().split()))
print (10 * c  + b + a)

Fixed submission:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)
 
a,b,c = sorted(map(int,readline().split()))
print (10 * c  + b + a)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = readline()
S = list(N)
bnk = len(N)-1
for i in range(2**bnk):
    op = ["-","-","-"]
    for j in range(bnk):
        if ((i>>j)&1):
            op[bnk-j-1] = "+"
    tmp = ""
    for k in range(bnk):
        tmp += S[k]+op[k]
    tmp = tmp+S[3]
    if eval(tmp)==7:
        print(tmp+"=7")
        exit()

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = readline().rstrip()
S = list(N)
bnk = len(N)-1
for i in range(2**bnk):
    op = ["-","-","-"]
    for j in range(bnk):
        if ((i>>j)&1):
            op[bnk-j-1] = "+"
    tmp = ""
    for k in range(3):
        tmp += S[k]+op[k]
    tmp = tmp+S[3]
    if eval(tmp)==7:
        print(tmp+"=7")
        break
Buggy python submission (verdict: Runtime Error):
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a,b,c = sorted(map(int,input().split()))
print (a + b)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a, b, c = map(int,readline().split())
print(min(a + b, b + c, c + a))