Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s_input =   input().split()
if(s_input[1] == '+'):
    print(int(s_input[0]+int(s_input[2])))
else:
    print(int(s_input[0]-int(s_input[2])))

Fixed submission:
s_input =   input().split()
if(s_input[1] == '+'):
    print(int(s_input[0])+int(s_input[2]))
else:
    print(int(s_input[0])-int(s_input[2]))

Buggy python submission (verdict: Runtime Error):
s_input =   input().split()
if(s_input[1] == '+'):
    print(int(s_input[0]+int(s_input[2]))
else:
    print(int(s_input[0]-int(s_input[2]))

Fixed submission:
s_input =   input().split()
if(s_input[1] == '+'):
    print(int(s_input[0])+int(s_input[2]))
else:
    print(int(s_input[0])-int(s_input[2]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split(" ")))
a = 'Yes'
m = 0
for i in range(1, len(h)):
    m = max(h[i], m)
    if h[i] < h[i-1] and m - h[i] > 1:
        a = 'No'
        break
print(a)


Fixed submission:
a,b,c = list(map(int, input().split(" ")))
l = a-b
if l >= c:
    print(0)
else:
    print(c-l)
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split(" "))
l = list(map(int, input().split(" ")))
d = 0
a = 1
for i in range(n):
    d += l[i]
    if d > x:
        a += i
        break
print(a)


Fixed submission:
x, a = map(int, input().split(" "))
print(0 if x < a else 10)

Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split(" "))
l = list(map(int, input().split(" ")))
d,a = 0,1
for i in range(n):
    d += l[i]
    if d > x:
        a += i
        break
print(a)


Fixed submission:
x, a = map(int, input().split(" "))
print(0 if x < a else 10)
Buggy python submission (verdict: Runtime Error):
N = int(input())
B = [int(i) for i in input().split()]
maxA = []
B.reverse()
maxA.append(B[0])

for i in range(N-1):
    if B[i] <= B[i-1]:
        maxA.append(B[i])
    else:
        maxA.append(B[i+1])
      
print(sum(maxA))

Fixed submission:
N = int(input())
B = [int(i) for i in input().split()]
maxA = []
B.reverse()
maxA.append(B[0])
if N == 0:
    print(0)
    exit()

for i in range(1,N-1):
    if B[i] <= B[i-1]:
        maxA.append(B[i])
    else:
        maxA.append(B[i-1])
   
print(sum(maxA)+B[-1])
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = str(input())
max = N-1
cnt = 0

if (S[0] == "R") & (S[1] == "R"):
    cnt += 1
if (S[N-1] =="L") & (S[N-2]=="L"):
    cnt += 1
for i in range(1, N-1):
    if S[i] == "L":
        if S[i-1] == "L":
            cnt += 1
    if S[i] == "R":
        if S[i+1] == "R":
            cnt += 1

if (cnt + K*2) > max:
    print(max)
else:
    print(cnt + K*2)

Fixed submission:
N, K = map(int, input().split())
S = str(input())
max = N-1
cnt = 0
if N == 1:
    print(0)
    exit()
    
if (S[0] == "R") & (S[1] == "R"):
    cnt += 1
if (S[N-1] =="L") & (S[N-2]=="L"):
    cnt += 1
for i in range(1, N-1):
    if S[i] == "L":
        if S[i-1] == "L":
            cnt += 1
    if S[i] == "R":
        if S[i+1] == "R":
            cnt += 1

if (cnt + K*2) > max:
    print(max)
else:
    print(cnt + K*2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = []

for i in range(1, N):
    P.append(i)
    
print(sum(P))

Fixed submission:
N = int(input())

print(N*(N-1)//2)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = []

for i in range(1, N):
    P.append(i)
    
print(sum(P))

Fixed submission:
N = int(input())

print(N*(N-1)//2)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
if (A -B) % 2  == 0):
    K = (A+B) / 2
    if (A - K)!2 == (B - K)!2:
        print(K)
    else:
        print("IMPOSSIBLE")
else:
    print("IMPOSSIBLE")



Fixed submission:
A, B = map(int, input().split())
K =  (A + B) // 2
if ((A + B)%2 == 0) & ((A-K)**2==(B-K)**2):
    print(K)
else:
    print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
mx=0
for i in range(N):
    A.append(int(input()))


if A.count(max(A)) > 1:
    for i in range(N):
        print(max(A))
else:
    for i in range(N):
        if A[i] != max(A):
            print(max(A))
        else:
            print(sorted(A)[-2])

Fixed submission:
N = int(input())
A = []

mx=0
for i in range(N):
    A.append(int(input()))

M = max(A)
    
if A.count(max(A)) > 1:
    for i in range(N):
        print(M)
else:
    for i in range(N):
        if A[i] != M:
            print(M)
        else:
            print(sorted(A)[-2])
Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int, input().split())
mn = 2020
 
for i in range(L, R):
    for j in range(i+1, R+1):
        if mn > (i*j)%2019:
            mn = (i*j)%2019
        elif mn == 0:
            break
print(mn)

Fixed submission:
L, R = map(int, input().split())
mn = 2020

for i in range(L, R):
    for j in range(i+1, R+1):
        if R - L >= 2019:
            mn = 0
            break
        elif mn > (i*j)%2019:
            mn = (i*j)%2019
        elif mn == 0:
            break
    if R - L >= 2019:
            break
    elif mn == 0:
            break
print(mn)

Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int, input().split())
mn = 2020

for i in range(L, R):
    for j in range(i+1, R+1):
        if mn > (i*j)%2019:
            mn = (i*j)%2019
        elif mn == 0:
            break
print(mn)

Fixed submission:
L, R = map(int, input().split())
mn = 2020

for i in range(L, R):
    for j in range(i+1, R+1):
        if R - L >= 2019:
            mn = 0
            break
        elif mn > (i*j)%2019:
            mn = (i*j)%2019
        elif mn == 0:
            break
    if R - L >= 2019:
            break
    elif mn == 0:
            break
print(mn)
Buggy python submission (verdict: Runtime Error):
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
lg_bw_x = [] 
s= 0
if N >= M:
    print(0)
else
    X.sort()
    for i in range(M-1):
        lg_bw_x.append(X[i+1] - X[i])
    lg_bw_x.sort()
    for j in range(M-N-1):
        s = s+lg_bw_x[j]
    print(s)


Fixed submission:
T, X = (int(i) for i in input().split())  
print(T / X)
Buggy python submission (verdict: Runtime Error):
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 

s= 0
if N >= M:
    print(0)
else
    X.sort()
    for i in range(M-1):
        lg_bw_x[i] = X[i+1] - X[i]
    for i in range(M-N-1):
        s = s+lg_bw_x[i]
    print(s)

Fixed submission:
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
lg_bw_x = [] 
s= 0
if N >= M:
    print(0)
else:
    X.sort()
    for i in range(M-1):
        lg_bw_x.append(X[i+1] - X[i])
    lg_bw_x.sort()
    for j in range(M-N):
        s = s+lg_bw_x[j]
    print(s)

Buggy python submission (verdict: Runtime Error):
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
s= 0
if N >= M:
    print(0)
else
    X.sort()
    for i in range(M-N-1):
        s = s+X[i]
    print(s)

Fixed submission:
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
lg_bw_x = [] 
s= 0
if N >= M:
    print(0)
else:
    X.sort()
    for i in range(M-1):
        lg_bw_x.append(X[i+1] - X[i])
    lg_bw_x.sort()
    for j in range(M-N):
        s = s+lg_bw_x[j]
    print(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split(' ')] 
B = [int(i) for i in input().split(' ')]
C = [int(i) for i in input().split(' ')]

s = 0
last = -2
for j in range(N):
    s += B[A[j]-1]
    if A[j] == last+1:
      s += C[last-1]
    last = A[j]
    
print(s)a

Fixed submission:
N = int(input())
A = [int(i) for i in input().split(' ')] 
B = [int(i) for i in input().split(' ')]
C = [int(i) for i in input().split(' ')]

s = 0
last = -2
for j in range(N):
    s += B[A[j]-1]
    if A[j] == last+1:
      s += C[last-1]
    last = A[j]
    
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
(N, M) = (int(i) for i in input().split(' '))
cards = set(range(1,N+1))

for i in range(0,M):
    # gate i can be opened by following card set
    (l, r) = (int(j) for j in input().split(' '))
    #print(cards, set(range(l,r+1)))
    cards = cards.intersection(set(range(l,r+1)))

print(len(cards))
    

Fixed submission:
(N, M) = (int(i) for i in input().split(' '))
(l0,r0) = (1, N)

n = -1
for i in range(0,M):
    # gate i can be opened by following card set
    (l, r) = (int(j) for j in input().split(' '))
    #print(cards, set(range(l,r+1)))
    if l > r0 or r < l0:
        n = 0
        break
    (l0,r0) = (max(l,l0), min(r,r0))

if n == -1:
    n = r0-l0 +1
    
print(n)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N, K = (int(i) for i in input().split(' '))
h=[]
for i in range(N):
    h.append(int(input()))

m = -1
for l in itertools.combinations(h,K):
    d = max(l) - min(l)
    if d < m or m == -1:
        m = d
print(m)

Fixed submission:
N, K = (int(i) for i in input().split(' '))
h=[]
for i in range(N):
    h.append(int(input()))

h.sort()

m = -1
for i in range(N-K+1):
    d = h[i+K-1] - h[i]
    if d < m or m == -1:
        m = d
        
print(m)
Buggy python submission (verdict: Runtime Error):
import collections
n=int(input())
v=[int(i) for i in input().split(' ')]

v_odd = v[1::2]
v_even = v[0::2]

vo = collections.Counter(v_odd).most_common()
ve = collections.Counter(v_even).most_common()

# 最大の値が同じ場合
if vo[0][0] == ve[0][0]:
    # 奇数のほうが少ない場合
    if vo[0][1] > ve[0][1]:
        result = len(v_odd) - vo[0][1] + len(v_even) - ve[1][1]
    elif vo[0][1] < ve[0][1]:
        result = len(v_odd) - vo[1][1] + len(v_even) - ve[0][1]
    else:
        result = len(v_odd) - vo[0][1] + len(v_even) 
else:
    result = len(v_odd) - vo[0][1] + len(v_even) - ve[0][1]

print(result)

Fixed submission:
n=input()
n = n.replace('1','a')
n = n.replace('9','b')
n = n.replace('a','9')
n = n.replace('b','1')
print(n)
Buggy python submission (verdict: Runtime Error):
n, x = (int(i) for i in input().split(' '))
a = [int(i) for i in input().split(' ')]

ch = 0 # 満足した子供の数

while x != 0: # お菓子がある間ループする
    if x - a[i] < 0: # a[i]個は渡せない
        x = 0
    else:
        x -= a[i]
        ch += 1

print(ch)        
    
    

Fixed submission:
n, x = (int(i) for i in input().split(' '))
a = sorted([int(i) for i in input().split(' ')])

ch = 0 # 満足した子供の数
s = 0
for i in range(n):
    if x < a[i]:
        x = 0
    elif x >= a[i]:
        x -= a[i]
        ch += 1
        
if x > 0:
    ch = ch -1

print(ch)
Buggy python submission (verdict: Runtime Error):
h, w = (int(i) for i in input().split(' '))


a=[]
for i in range(h):
    a.append([int(j) for j in input().split(' ')])

j = 0
p = []
tr = []
picked = False

for i in range(h):
                
    step = -1 if i%2 else 1
    j = w-1 if i%2 else 0
    while j >=0 and j < w:
        if a[i][j] % 2:
            if picked == False:
                picked = True
            else:
                tr.append([i,j])
                picked = False
                for t_index in range(len(tr)-1):
                    p.append((tr[t_index], tr[t_index+1]))
                tr = []

        if picked:
            tr.append([i,j])
        j = j + step

print(len(p))
for ans in p:
    print(ans[0][0]+1,ans[0][1]+1,ans[1][0]+1, ans[1][1]+1)


Fixed submission:
a, b = (int(i) for i in input().split(' '))
if (a*b) % 2:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

C = [0 for _ in A]
C[0] = A[0]
for i in range(1, len(A)):
    C[i] = C[i-1] + A[i]

from collections import Counter
from scipy.special import comb
count = Counter(C)

li = list(count.values())

res = 0
for l in li:
    if l == 1:
        pass
    else:
        res += comb(l, 2)
res += count[0]

print(int(res))

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

C = [0 for _ in A]
C[0] = A[0]
for i in range(1, len(A)):
    C[i] = C[i-1] + A[i]

from collections import Counter

count = Counter(C)

li = list(count.values())

res = 0
for l in li:
    if l == 1:
        pass
    else:
        res += l * (l - 1) / 2
res += count[0]

print(int(res))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

res = 0
for i in range(len(A)):
    temp = 0
    for j in range(i, len(A)):
        temp += A[j]
        if temp == 0:
            res += 1
print(res)

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

C = [0 for _ in A]
C[0] = A[0]
for i in range(1, len(A)):
    C[i] = C[i-1] + A[i]

from collections import Counter

count = Counter(C)

li = list(count.values())

res = 0
for l in li:
    if l == 1:
        pass
    else:
        res += l * (l - 1) / 2
res += count[0]

print(int(res))
Buggy python submission (verdict: Runtime Error):
A, B, C, X, Y = map(int, input().split())

if Y == X:
    if C * 2 < A + B:
        res = C * X * 2
        print(res)
        
elif Y < X:
    if C * 2 <= A + B:
        res = C * Y * 2
        if C * 2 <= A:
            res += (X - Y) * 2 * C
        else:
            res += (X - Y) * A
    else:
        res = A * X + B * Y

else:
    if C * 2 <= A + B:
        res = C * X * 2
        if C * 2 <= B:
            res += (Y - X) * 2 * C
        else:
            res += (Y - X) * B
    else:
        res = A * X + B * Y

print(res)

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

if Y == X:
    if C * 2 < A + B:
        res = C * X * 2
    else:
        res = A * X + B * Y
        
elif Y < X:
    if C * 2 <= A + B:
        res = C * Y * 2
        if C * 2 <= A:
            res += (X - Y) * 2 * C
        else:
            res += (X - Y) * A
    else:
        res = A * X + B * Y

else:
    if C * 2 <= A + B:
        res = C * X * 2
        if C * 2 <= B:
            res += (Y - X) * 2 * C
        else:
            res += (Y - X) * B
    else:
        res = A * X + B * Y

print(res)
Buggy python submission (verdict: Runtime Error):
n=input()
print(n*n*n)

Fixed submission:
n=input()
print(n*n*n)

Buggy python submission (verdict: Runtime Error):
N = input()
print(N*N*N)

Fixed submission:
n=input()
print(n*n*n)
Buggy python submission (verdict: Runtime Error):
    x, a = map(int, input().split())
    r = 0 if x < a else 10
    print(r)

Fixed submission:
x, a = map(int, input().split())
r = 0 if x < a else 10
print(r)
Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
i = 1
cnt = 0
while X - max(D) >= 0:
  D.append(D[i-1]+ L[i-1])
  i += 1
  cnt += 1
  if i == N+2:
    break
if cnt == 0:
  print(cnt+1)
else:
  print(cnt)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
N += 1
i = 0
cnt = 0
while X - D >= 0:
  D += L[i]
  i += 1
  cnt += 1
if cnt == 0:
  print(cnt+1)
else:
  print(cnt)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
i = 0
cnt = 0
while X - D >= 0:
  D += L[i]
  i += 1
  cnt += 1
if cnt == 0:
  print(cnt+1)
else:
  print(cnt)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
i = 0
cnt = 0
while D <= X:
  D += L[i]
  i += 1
  cnt += 1
print(cnt)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
i = 0
cnt = 0
while D <= X:
  D += L[i]
  i += 1
  cnt += 1
print(cnt)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
M,D = map(int, input().split())
if M < 4 or D < 22:
    print(0)
else:
    result=0
    for m in range(4,M+1):
        for d in range(22,D+1):
            if str(d)[0] >= 2 and str(d)[1] >= 2 and int(str(d)[0])*int(str(d)[1])==m:
                result += 1
    print(result)

Fixed submission:
M,D = map(int, input().split())
if M < 4 or D < 22:
    print(0)
else:
    result=0
    for m in range(4,M+1):
        for d in range(22,D+1):
            if int(str(d)[0]) >= 2 and int(str(d)[1]) >= 2 and int(str(d)[0])*int(str(d)[1])==m:
                result += 1
    print(result)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = [input() for k in range(N)]
s = [''.join(sorted(list(s_element))) for s_element in s]
memory = {}
result = 0
for s_element in s:
    if s_element not in list(memory.keys()):
        memory[s_element] = 1
    else:
        result += memory[s_element]
        memory[s_element] += 1
print(result)

Fixed submission:
N = int(input())
s = [input() for k in range(N)]
s = [''.join(sorted(list(s_element))) for s_element in s]
memory = {}
result = 0
for s_element in s:
    if s_element not in memory:
        memory[s_element] = 1
    else:
        result += memory[s_element]
        memory[s_element] += 1
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import heapq
N,M = map(int, input().split())
works_array = np.array([tuple(map(int, input().split())) for k in range(N)])
rewards = []
reward_sum = 0
heapq.heapify(rewards)
for k in range(M+1):
    indices = np.where(works_array[:,0]==k)[0]
    if indices.shape[0] != 0:
        for index in indices:
            heapq.heappush(rewards, -works_array[index, 1])
    if len(rewards) != 0:
        reward_sum += - heapq.heappop(rewards)
print(reward_sum)

Fixed submission:
import heapq
N,M = map(int, input().split())
works = {}
for _ in range(N):
    a, b = map(int, input().split())
    if a not in works:
        works[a] = [b]
    else:
        works[a].append(b)
rewards = []
reward_sum = 0
for k in range(M+1):
    if k in works:
        print()
        for j in works[k]:
            heapq.heappush(rewards, -j)
    if len(rewards) != 0:
        reward_sum -= heapq.heappop(rewards)
print(reward_sum)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,M = map(int, input().split())
works_array = np.array([tuple(map(int, input().split())) for k in range(N)])
reward = 0
for k in range(M+1):
    workable_indices = np.where(works_array[:,0] <= k)[0]
    if workable_indices.shape[0] == 0:
        continue
    else:
        max_index = np.argmax(works_array[workable_indices, 1])
        reward += works_array[workable_indices[max_index], 1]
        works_array = np.delete(works_array, workable_indices[max_index], axis=0)
print(reward)

Fixed submission:
import heapq
N,M = map(int, input().split())
works = {}
for _ in range(N):
    a, b = map(int, input().split())
    if a not in works:
        works[a] = [b]
    else:
        works[a].append(b)
rewards = []
reward_sum = 0
for k in range(M+1):
    if k in works:
        print()
        for j in works[k]:
            heapq.heappush(rewards, -j)
    if len(rewards) != 0:
        reward_sum -= heapq.heappop(rewards)
print(reward_sum)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(sys.stdin.readline().rstrip())
H = list(map(int, sys.stdin.readline().rstrip().split()))
for k in range(N-1):
    if H[k]-1 > min(H[k+1:]):
        print("No");exit()
print("Yes")

Fixed submission:
import sys
N = int(sys.stdin.readline().rstrip())
H = list(map(int, sys.stdin.readline().rstrip().split()))
for k in range(2,N+1):
    if H[-k] <= H[-k+1]:
        continue
    elif H[-k] == H[-k+1] + 1:
    	H[-k] -= 1
    else:
        print("No");exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
a_total, b_total = 0,0
for k in range(N):
    m = max(a)
    if k%2==0:
        a_total += m
    else:
        b_total += m
    a.remove(max(a))
print(a_total-b_total)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
a_total, b_total = 0,0
for k in range(N):
    m = max(a)
    if k%2==0:
        a_total += m
    else:
        b_total += m
    a.remove(max(a))
print(a_total-b_total)
Buggy python submission (verdict: Runtime Error):
S = input()
for k in range(len(S)/5):
    for word in ["dream", "dreamer", "erase", "eraser"]:
        if S.endswith(word):
            S=S.rstrip(word)
if len(S)==0:
    print("YES")
else:
    print("NO")

Fixed submission:
S = input()
for k in range(int(len(S)/5)):
    for word in ["dream", "dreamer", "erase", "eraser"]:
        if S.endswith(word):
            S=S[:-len(word)]
if len(S)==0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n = input()

for i in range(n):
  t, x, y = map(int, input().split())
  if((x+y) > t or (t+x+y) % 2:
     print("No")
     exit()
print("Yes")

Fixed submission:
n = int(input())

for i in range(n):
  t, x, y = map(int, input().split())
  if(x+y) > t or (t+x+y) % 2:
      print("No")
      exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    while (b!= 0):
        a,b=b,a%b
    return a

l = raw_input().split()

a = int(l[0])
b = int(l[1])
c = int(l[2])
d = int(l[3])

lcm = ((c*d)//(gcd(c,d)))

div = []

div.append((a-1)/c)
div.append((a-1)/d)

div.append(b/c)
div.append(b/d)

div.append(a/lcm)
div.append(b/lcm)

ans =  (div[2]-div[0])+(div[3]-div[1])-(div[5]-div[4])
ans = (b-a+1) - ans

print ans


Fixed submission:
S = raw_input()
flag = True
for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break

if flag == True:
    print ("Good")
else:
    print("Bad")

Buggy python submission (verdict: Runtime Error):
S = input()
S = str(S)
flag = True

for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break
    
if flag == True:
    print ("Good")
else:
    print("Bad")



Fixed submission:
S = raw_input()
flag = True
for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break

if flag == True:
    print ("Good")
else:
    print("Bad")

Buggy python submission (verdict: Runtime Error):
S = input()
dig = 0
dig_pre = 0
flag = True


for i in range(4):
    dig = S % 10
    if i>0:
        if(dig == dig_pre):
            flag = False
            break
    dig_pre = dig
    S = S/10

if flag == True:
    print ("Good")
else:
    print("Bad")


Fixed submission:
S = raw_input()
flag = True
for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break

if flag == True:
    print ("Good")
else:
    print("Bad")
Buggy python submission (verdict: Runtime Error):
n,q=map(int,input().split())
a=[]
b=[]
s=[0]


for i in range(0,n-1):
    A,B=map(int,input().split())
    a.append(A)
    b.append(B)
    s.append(0)
for i in range(0,q):
    P,X=map(int,input().split())
    s[P-1]=s[P-1]+X


for j in range(0,n-1):
    s[b[j]-1]=s[b[j]-1]+s[a[j]-1]

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

Fixed submission:
a=int(input())
s=input()

if a>=3200:
    print(s)
else:
    print('red')
Buggy python submission (verdict: Runtime Error):
n=int(input())
V=map(int,input().split())
v=list(V)

v=v.sort()
s=v[0]
for i in range(1,n):
    s=(s+v[i])/2

print(s)


Fixed submission:
n=int(input())
d=map(int,input().split())
v=list(d)

v.sort()

s=v[0]
for i in range(1,n):
    s=(s+v[i])/2

print(s)