Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys

def gcd(x, y):
    while (y != 0):
        x, y = y, x%y
    return (x)

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

result = sys.maxsize

a[0] = a[1]

for i in range(1):
    for j in range(i+1,n):
        if(a[i]>result and result < 1000000001):
            a[i]=result
        if(a[i] >= a[j]):
            result = gcd(a[i], a[j])
        elif(a[i] < a[j]):
           result = gcd(a[j], a[i])
        if (result == 1):
            break

print(result)

Fixed submission:
import math

a,b,t = (int(i) for i in input().split())

result = math.floor(((t+0.5)/a))*b

print(result)

Buggy python submission (verdict: Runtime Error):
def gcd(x, y):
    while (y != 0):
        x, y = y, x%y
    return (x)

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

result = 1000000000
a[0] = a[1]

for i in range(1):
    for j in range(i+1,n):
        if(a[i]>result):
            a[i]=result
        if(a[i] >= a[j]):
            result = gcd(a[i], a[j])
        elif(a[i] < a[j]):
           result = gcd(a[j], a[i])
        if (result == 1):
            break

print(result)

Fixed submission:
import math

a,b,t = (int(i) for i in input().split())

result = math.floor(((t+0.5)/a))*b

print(result)

Buggy python submission (verdict: Runtime Error):
def gcd(x, y):
    while (y != 0):
        x, y = y, x%y
    return (x)

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

result = 1000000000
a[0] = a[1]

for i in range(1):
    for j in range(i+1,n):
        if(a[j]>result):
            a[i]=result
        if(a[i] >= a[j]):
            result = gcd(a[i], a[j])
        elif(a[i] < a[j]):
           result = gcd(a[j], a[i])
        if (result == 1):
            break

print(result)

Fixed submission:
import math

a,b,t = (int(i) for i in input().split())

result = math.floor(((t+0.5)/a))*b

print(result)
Buggy python submission (verdict: Runtime Error):
import re

n = int(input())
s = input()
k = int(input())

keychar = s[k-1]
mask = "*"
mask2 = "1"

masked = re.sub(r'%s'%keychar, mask2, s)
masked = re.sub(r'[a-z]', mask, masked)
masked = re.sub(r'%s'%mask2, keychar, masked)
print(masked)


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

if (a < c and c < b):
  print("Yes")
elif (b < c and c < a):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

mod_list = []

a_mod = a % 10
if a_mod == 0:
    a_total = a
else:
    a_total = a + (10 - a_mod)
    mod_list.append(a_mod)

b_mod = b % 10
if b_mod == 0:
    b_total = b
else:
    b_total = b + (10 - b_mod)
    mod_list.append(b_mod)

c_mod = c % 10
if c_mod == 0:
    c_total = c
else:
    c_total = c + (10 - c_mod)
    mod_list.append(c_mod)

d_mod = d % 10
if d_mod == 0:
    d_total = d
else:
    d_total = d + (10 - d_mod)
    mod_list.append(d_mod)

e_mod = e % 10
if e_mod == 0:
    e_total = e
else:
    e_total = e + (10 - e_mod)
    mod_list.append(e_mod)

min_mod = 0
min_mod = min(mod_list)

if min_mod == 0:
    cut_time = 0
else:
    cut_time = 10 - min(mod_list)

print(a_total + b_total + c_total + d_total + e_total - cut_time)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

mod_list = []

a_mod = a % 10
if a_mod == 0:
    a_total = a
else:
    a_total = a + (10 - a_mod)
    mod_list.append(a_mod)

b_mod = b % 10
if b_mod == 0:
    b_total = b
else:
    b_total = b + (10 - b_mod)
    mod_list.append(b_mod)

c_mod = c % 10
if c_mod == 0:
    c_total = c
else:
    c_total = c + (10 - c_mod)
    mod_list.append(c_mod)

d_mod = d % 10
if d_mod == 0:
    d_total = d
else:
    d_total = d + (10 - d_mod)
    mod_list.append(d_mod)

e_mod = e % 10
if e_mod == 0:
    e_total = e
else:
    e_total = e + (10 - e_mod)
    mod_list.append(e_mod)

min_mod = 0
if len(mod_list) != 0:
    min_mod = min(mod_list)

if min_mod == 0:
    cut_time = 0
else:
    cut_time = 10 - min(mod_list)

print(a_total + b_total + c_total + d_total + e_total - cut_time)
Buggy python submission (verdict: Runtime Error):
a,b,k = map(int,input().split())
x=0
y=[0]
c=min(a,b)

if a==1 or b==1:
    print(1)
    exit()
    
for d in range(1,c):
    if a%d==0 and b%d==0:
            y.append(d)

print(y[k])

Fixed submission:
a,b,k = map(int,input().split())
x=0
y=[0]
c=min(a,b)

if a==1 or b==1:
    print(1)
    exit()
    
for d in range(1,c+1):
    if a%d==0 and b%d==0:
            y.append(d)

print(y[-k])

Buggy python submission (verdict: Runtime Error):
a,b,k = map(int,input().split())
x=0
y=[0]
c=min(a,b)

if a==1 or b==1:
    print(1)
    exit()
    
for d in range(1,c):
    if a%d==0 and b%d==0:
            y.append(d)

print(y[k])
print(y)


Fixed submission:
a,b,k = map(int,input().split())
x=0
y=[0]
c=min(a,b)

if a==1 or b==1:
    print(1)
    exit()
    
for d in range(1,c+1):
    if a%d==0 and b%d==0:
            y.append(d)

print(y[-k])
Buggy python submission (verdict: Runtime Error):
k, a, b = map(int, input().split())
x=k+1
y=0
if b>a:
    c=b-a
    k=k-a-1
    y=c*(k//2-1)+b+(k%2)
print(max(x.y))

Fixed submission:
k, a, b = map(int, input().split())
x=k+1
y=0
if b>a:
    c=b-a
    k-=a-1
    y=c*(k//2-1)+b+(k%2)
print(max(x,y))

Buggy python submission (verdict: Runtime Error):
k,a,b = map(int,input().split())
n=1
e=0
for i in range(k):
    if (k-i)%2==0:
        
        if e=1:
            n=n+b
            continue
        if n>=a:
            e=1
            n=n-a
            continue
    else
        n=n+1
        continue
print(n)
    


Fixed submission:
k, a, b = map(int, input().split())
x=k+1
y=0
if b>a:
    c=b-a
    k-=a-1
    y=c*(k//2-1)+b+(k%2)
print(max(x,y))

Buggy python submission (verdict: Runtime Error):
k,a,b = map(int,input().split())
n=1
e=0
for i in range(k):
    if (k-i)%2=0:
        
        if e=1:
            n=n+b
            continue
        if n>=a:
            e=1
            n=n-a
            continue
    else
        n=n+1
        continue
print(n)
    

Fixed submission:
k, a, b = map(int, input().split())
x=k+1
y=0
if b>a:
    c=b-a
    k-=a-1
    y=c*(k//2-1)+b+(k%2)
print(max(x,y))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input(sprit()))
print((a-1)(b-1))

Fixed submission:
a,b=map(int,input().split())
print((a-1)*(b-1))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input(,sprit()))
print((a-1)(b-1))

Fixed submission:
a,b=map(int,input().split())
print((a-1)*(b-1))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

#print(N,M)

okList = [1] * N

#print(okList)
#print(type(okList))

for i in range(M):
    L, R = map(int, input().split())
    L -= 1
    if 0 < L:
        okList[0:L] = [0] * L
        #print(okList)

    if R < len(okList):
        okList[R:len(okList)] = [0] * (len(okList) - R)
        #print(okList)

print(sum(okList))

Fixed submission:
N, M = map(int, input().split())
maxL = 1
minR = N

for i in range(M):
    L, R = map(int, input().split())
    if maxL < L:
        maxL = L
    if minR != None and R < minR:
        minR = R
    #print("\t\t\t", maxL, minR)

if maxL <= minR:
    print(minR - maxL + 1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
in_ = input()
n, k = in_.split()

if ((n - 1) <= 0):
  print("NO")
  exit()

if (1 <= (n - 1) / k):
  print("YES")
else:
  print("NO")

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

if (k == 1):
    print("YES")
    exit()

if ((n % 2) == 1):
    n += 1

if (2 <= (n / k)):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
in_ = input()
n, k = in_.split()
if (1 <= (n - 1) / k):
  print("YES")
else:
  print("NO")

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

if (k == 1):
    print("YES")
    exit()

if ((n % 2) == 1):
    n += 1

if (2 <= (n / k)):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = input()
k = input()
if (2 < n / k):
  print("Yes")
else:
  print("No")


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

if (k == 1):
    print("YES")
    exit()

if ((n % 2) == 1):
    n += 1

if (2 <= (n / k)):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
k, a, b = map(int, input().split())

if (k == 1):
    print(2)
    exit()

if (b <= (a + 1)):
    print(k + 1)
    exit()
else:
    bis = 1
    mon = 0
    for i in range(k):
        if(1 <= mon):
            mon -= 1
            bis += b
        elif(a <= bis and i != (k-1)):
            bis -= a
            mon += 1
        else:
            bis += 1
    print(bis)

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

if (k == 1):
    print(2)
    exit()

if (b <= (a + 1)):
    print(k + 1)
    exit()
else:
    tmp1 = k - (a - 1)
    sabun = b - a

    if (tmp1 % 2 == 0):
        bis = int((tmp1 / 2 - 1)) * int(sabun) + b
    else:
        zouka = int((tmp1 // 2 - 1)) * int(sabun)
        bis = zouka + b + 1

    print(bis)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    k,s = map(int,input().split())
    cnt = 0

    for x in range(k+1):
        for y in range(k+1):
            for z in range(k+1):
                if x+y+z == s:
                    cnt+=1
    print(cnt)
main()

Fixed submission:
def main():
    k,s = map(int,input().split())
    cnt = 0

    for x in range(k+1):
        for y in range(k+1):
            if 0 <= s-(x+y) <= k:
                cnt+=1
    print(cnt)
main()
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()
new=s[k]
news=new.lower()
print(s[:k-1]+news+s[k:])

Fixed submission:
n,k=map(int,input().split())
s=input()
new=s[k-1:k]
news=new.lower()
print(s[:k-1]+news+s[k:])

Buggy python submission (verdict: Runtime Error):
n,k=int(input().split())
s=input()
print(s[:k-1]+s.replace(s[k-1], s[k-1].lower())+s[k:])

Fixed submission:
n,k=map(int,input().split())
s=input()
new=s[k-1:k]
news=new.lower()
print(s[:k-1]+news+s[k:])

Buggy python submission (verdict: Runtime Error):
n,k=int(input().split())
s=input()
print('s[:k-1]'+'s.replace(s[k-1], s[k-1].lower())'+'s[k:]')


Fixed submission:
n,k=map(int,input().split())
s=input()
new=s[k-1:k]
news=new.lower()
print(s[:k-1]+news+s[k:])

Buggy python submission (verdict: Runtime Error):
n,k=int(input().split())
s=input()
s[k-1]=s[k-1].lower()
print(s)

Fixed submission:
n,k=map(int,input().split())
s=input()
new=s[k-1:k]
news=new.lower()
print(s[:k-1]+news+s[k:])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N = int(input())
V = map(int, input().split())
C = map(int, input().split())

gain = 0
for i in range(0,N):
    if(V[i]>C[i]):
        gain += V[i] - C[i]

print(gain)

Fixed submission:
a,b,t=map(int,input().split())
print((t//a)*b)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N = int(input())
V = map(int, input().split())
C = map(int, input().split())

gain = 0
for i in range(0,N):
    if(V[i]>C[i]):
        gain += V[i] - C[i]

print(gain)

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=0
for i in range(n):
  if v[i]>c[i]:
    ans+=v[i]-c[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
if int(s[5:7])<5:
	print('Heisei')
else:
	print('TBD')

Fixed submission:
a,b=map(int,input().split())
if b%a==0:
	print(a+b)
else:
	print(b-a)
Buggy python submission (verdict: Runtime Error):
d=int(input())
if d==25:
	print('Christmas')
elif d==24:
    print('Christmas Eve')
elif d==23:
    print('Christmas Eve Eve')
else d==22:
    print('Christmas Eve Eve Eve')

Fixed submission:
d=int(input())
if d==25:
	print('Christmas')
elif d==24:
    print('Christmas Eve')
elif d==23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')

Buggy python submission (verdict: Runtime Error):
d=int(input())
if d==25:
	print('Christmas')
elif d==24:
    print('Christmas Eve ')
elif d==23:
    print('Christmas Eve Eve')
else d==22:
    print('Christmas Eve Eve Eve ')

Fixed submission:
d=int(input())
if d==25:
	print('Christmas')
elif d==24:
    print('Christmas Eve')
elif d==23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')

Buggy python submission (verdict: Runtime Error):
d=int(input())
if d==25:
	print('Christmas')
else d==24:
    print('Christmas Eve ')
else d==23:
    print('Christmas Eve Eve')
else d==22:
    print('Christmas Eve Eve Eve ')

Fixed submission:
d=int(input())
if d==25:
	print('Christmas')
elif d==24:
    print('Christmas Eve')
elif d==23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
n=input()
for i in range(2)
if n[i]=1:
  n[i]=9
else:
  n[i]=1
print(n)

Fixed submission:
for i in input():
    print(9 if i == '1' else 1, end='')
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
print((a-1)*(b-1))

Fixed submission:
a,b=map(int,input().split())
print((a-1)*(b-1))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a<=8&b<=8:
  print('Yay!')
else
  print(':(')

Fixed submission:
a,b=map(int,input().split())
if a<=8 and b<=8:
  print('Yay!')
else:
  print(':(')

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

if a<9&&b<9:
	print('Yay!')
else:
    print(':(') 

Fixed submission:
a,b=map(int,input().split())
if a<=8 and b<=8:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')


Fixed submission:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(a-c)<=d:
  print('Yes')


Fixed submission:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if abs(a-b)<=d or abs(a-c)<=d:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n=input()
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print(Yes)
else:
  print(No)


Fixed submission:
N = input()

print("Yes" if (N[0] == N[1] == N[2] or N[1] == N[2] == N[3]) else "No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input())
print(a+b+c-max(a,b,c))

Fixed submission:
a,b,c=map(int,input().split())
print(a+b+c-max(a,b,c))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(input().split())
A=a.upper()
B=b.upper()
C=c.upper()
print(A[0]+B[0]+C[0])


Fixed submission:
a,b,c=map(str,input().split())
A=a.upper()
B=b.upper()
C=c.upper()
print(A[0]+B[0]+C[0])
Buggy python submission (verdict: Runtime Error):
n=int(inpt())
x=800*n
y=(n//15)*200
print(x-y)

Fixed submission:
n=int(input())
x=800*n
y=(n//15)*200
print(x-y)
Buggy python submission (verdict: Runtime Error):
c=input()
if c='a' or c='i' or c='u' or c='e' or c='o':
  print('vowel')
else:
  print('consonant')

Fixed submission:
c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
  print('vowel')
else:
  print('consonant')

Buggy python submission (verdict: Runtime Error):
c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
  print(vowel)
else:
  print(consonant)

Fixed submission:
c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
  print('vowel')
else:
  print('consonant')

Buggy python submission (verdict: Runtime Error):
c=input()
if c='a' or c='i' or c='u' or c='e' or c='o':
  print(vowel)
else:
  print(consonant)

Fixed submission:
c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
  print('vowel')
else:
  print('consonant')
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

import sympy

N = int(input())
if N == 1 or N == 2:
    print("0")
    sys.exit()

N_divisors = sympy.divisors(N)

N_length = len(N_divisors)
N_length_half = N_length // 2
N_length_mod = N_length % 2

N_length_half_temp = 0

if N_length_mod == 1:
    N_length_half_temp = N_length_half + 1
else:
    N_length_half_temp = N_length_half

print(N_divisors)
print(sum(N_divisors[N_length_half_temp:]) - (N_length - N_length_half_temp))

Fixed submission:
import sys
input = sys.stdin.readline

import numpy as np

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

N = int(input())
if N == 1 or N == 2:
    print("0")
else:
    N_divisors = make_divisors(N)

    N_length = len(N_divisors)
    N_length_half = N_length // 2
    N_length_mod = N_length % 2

    N_length_half_temp = 0

    if N_length_mod == 1:
        N_length_half_temp = N_length_half + 1
    else:
        N_length_half_temp = N_length_half
    if N_divisors[N_length_half_temp]-1 == N_divisors[N_length_half_temp-1]:
        N_length_half_temp += 1
    print(sum(N_divisors[N_length_half_temp:]) - (N_length - N_length_half_temp))
Buggy python submission (verdict: Runtime Error):
if(A == B):
    print(C)
elif(B == C):
    print(A)
else:
    print(B)


Fixed submission:
A, B, C = map(int, input().split())
if(A == B):
    print(C)
elif(B == C):
    print(A)
else:
    print(B)
Buggy python submission (verdict: Runtime Error):
from fractions import Fraction as F
N = int(input())
left = F(4, N)
for i in range(1, 3500):
    if(left > F(1, i)):
        h = i
        break
for i in range(1, 3500):
    if(left > F(1, h) + F(1, i)):
        n = i
        break
for i in range(1, 3500):
    if(left == F(1, h) + F(1, n) + F(1, i)):
        w = i
        break
print(h, n, w)


Fixed submission:
s = input()
ans = 0
for i in range(len(s)):
    if(s[i] == '1'):
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
from fractions import F
N = int(input())
left = F(4, N)
for i in range(1, 3500):
    if(left > F(1, i)):
        h = i
        break
for i in range(1, 3500):
    if(left > F(1, h) + F(1, i)):
        n = i
        break
for i in range(1, 3500):
    if(left > F(1, h) + F(1, n) + F(1, i)):
        w = i
        break
print(h, n, w)


Fixed submission:
s = input()
ans = 0
for i in range(len(s)):
    if(s[i] == '1'):
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
    S = input()
    for i in range(len(S) - 1, 0, -1):
        if(S[0:i//2] == S[i//2:i]):
            print(i)
            break


Fixed submission:
S = input()
for i in range(len(S) - 1, 0, -1):
    if(S[0:i//2] == S[i//2:i]):
        print(i)
        break
Buggy python submission (verdict: Runtime Error):
r, g, b = map(int, raw_input().split())
num = r * 100 + g * 10 + b
if(num % 4 == 0):
    print("Yes")
else:
    print("No")


Fixed submission:
r, g, b = map(int, input().split())
num = r * 100 + g * 10 + b
if(num % 4 == 0):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
group = [[1,3,5,7,8,10,12],[4,6,9,11]]

x, y = map(int, raw_input().split())
for i in range(0,1):
    if(group[i].count(x) > 0 and group[i].count(y) > 0):
        print("Yes")
        exit()
print("No")


Fixed submission:
group = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]

x, y = map(int, input().split())
for i in range(0,2):
    if(group[i].count(x) > 0 and group[i].count(y) > 0):
        print("Yes")
        exit()
print("No")
Buggy python submission (verdict: Runtime Error):
    y, x = map(int, input().split())
    image = ["#" * (x+2)]
    for y in range(0,y):
        image.append("#"  + input() + "#")
    image.append("#" * (x+2))
    for img in image:
        print(img)


Fixed submission:
y, x = map(int, input().split())
image = ["#" * (x+2)]
for y in range(0,y):
    image.append("#"  + input() + "#")
image.append("#" * (x+2))
for img in image:
    print(img)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
 
if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

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


if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')


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


if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
if a*b%2==0:
  print('Even')
else:
  print('Odd')

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


if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
if a*b%2==0:
  print("Even")
else:
  print("Odd")

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


if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
n=input()
cun=0
for i in n:
  if i=='1':
    con++
print(con)

Fixed submission:
n = input()
cun = 0
for i in n:
    if i == '1':
        cun += 1
print(cun)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
N, M = map(int, input().split())
AB = [list(map(int, input().split())), for i in range(N)]

AB.sort()

ans = 0
for i, j in AB
	ans += i * min(M, j)
	M -= min(M, j)

print(ans)


Fixed submission:
#!/usr/bin/env python3
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for i in range(N)]

AB.sort()

ans = 0
for i, j in AB:
	ans += i * min(M, j)
	M -= min(M, j)

print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())    
                                    
x = []                              
for i in range(M):                  
    l,r = map(int, input().split()) 
    x.append([l, r])                
                                    
                                    
cand = list(range(1, N+1))          
                                    
for i, p in enumerate(x):           
    l,r = p                         
    if cand[0] < l:                 
        del cand[:(l - cand[0])]    
    if cand[-1] > r:                
        del cand[(r-cand[0]+1):]    
                                    
print(len(cand))                    


Fixed submission:
N, M = map(int, input().split())        
                                        
x = []                                  
for i in range(M):                      
    l,r = map(int, input().split())     
    x.append([l, r])                    
                                        
                                        
cand = list(range(1, N+1))              
                                        
for i, p in enumerate(x):               
    l,r = p                             
    if (r < cand[0]) or (l > cand[-1]): 
        del cand[0:]                    
        break                           
                                        
    if cand[0] < l:                     
        del cand[:(l - cand[0])]        
    if cand[-1] > r:                    
        del cand[(r-cand[0]+1):]        
                                        
print(len(cand))
Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
x = [[] for x in range(N)]
for i in range(N-1):
     u, v, w = list(map(int, input().split()))
     x[u-1].append([v-1, w])
     x[v-1].append([u-1,w])



ret = {}
done = []

queue = [0]

for i in range(N):
    curr = queue.pop()
    if curr == 0:
        ret[0] = 0

    for neigh in x[curr]:
        if neigh in done:
            continue
        if neigh[1] % 2 == 0:
            ret[neigh[0]] = ret[curr]
        else:
            ret[neigh[0]] = 0 if ret[curr] == 1 else 1

        queue.append(neigh[0])
    done.append(curr)


for i in range(N):
    print(ret[i])


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

for ix, c in enumerate(S):
    if K == (ix + 1):
        print(c.lower(), end='')
    else:
        print(c, end='')