Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def solve(s_pp, p_pp):
    p_nums = []
    for x, y in s_pp:
        distance = []
        for xx, yy in p_pp:
            n = abs(x - xx) + abs(y - yy)
            distance.append(n)
        min_distance_idx = distance.index(min(distance))
        p_nums.append(min_distance_idx + 1)
    return p_nums


def main():
    students, points = [int(e) for e in input().split()]
    students_ps = []
    points_ps = []

    for _ in range(students):
        x, y = [int(e) for e in input().split()]
        students_ps.append([x, y])
    for _ in range(points):
        x, y = [int(e) for e in input().split()]
        points_ps.append([x, y])
    
    for answer in solve(students_ps, points_ps):
        print(answer)


m

Fixed submission:
# -*- coding: utf-8 -*-


def solve(s_pp, p_pp):
    p_nums = []
    for x, y in s_pp:
        distance = []
        for xx, yy in p_pp:
            n = abs(x - xx) + abs(y - yy)
            distance.append(n)
        min_distance_idx = distance.index(min(distance))
        p_nums.append(min_distance_idx + 1)
    return p_nums


def main():
    students, points = [int(e) for e in input().split()]
    students_ps = []
    points_ps = []

    for _ in range(students):
        x, y = [int(e) for e in input().split()]
        students_ps.append([x, y])
    for _ in range(points):
        x, y = [int(e) for e in input().split()]
        points_ps.append([x, y])
    
    for answer in solve(students_ps, points_ps):
        print(answer)


main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def solve(s_pp, p_pp):
    p_nums = []
    for x, y in s_pp:
        distance = []
        for xx, yy in p_pp:
            n = abs(x, xx) + abs(y, yy)
            distance.append(n)
        p_nums.append(min(distance))
    return p_nums


def main():
    students, points = [int(e) for e in input().split()]
    students_ps = []
    points_ps = []

    for _ in range(students):
        x, y = [int(e) for e in input().split()]
        students_ps.append([x, y])
    for _ in range(points):
        x, y = [int(e) for e in input().split()]
        points_ps.append([x, y])
    
    for answer in solve(students_ps, points_ps):
        print(answer)


main()


Fixed submission:
# -*- coding: utf-8 -*-


def solve(s_pp, p_pp):
    p_nums = []
    for x, y in s_pp:
        distance = []
        for xx, yy in p_pp:
            n = abs(x - xx) + abs(y - yy)
            distance.append(n)
        min_distance_idx = distance.index(min(distance))
        p_nums.append(min_distance_idx + 1)
    return p_nums


def main():
    students, points = [int(e) for e in input().split()]
    students_ps = []
    points_ps = []

    for _ in range(students):
        x, y = [int(e) for e in input().split()]
        students_ps.append([x, y])
    for _ in range(points):
        x, y = [int(e) for e in input().split()]
        points_ps.append([x, y])
    
    for answer in solve(students_ps, points_ps):
        print(answer)


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


def main(n):
    pre = 1
    for i in range(1, n):
        pre = pre * i
    return pre * n % (pow(10, 9) + 7)


ans = main(n)
print(ans)


Fixed submission:
n = int(input())


mod_num = pow(10, 9) + 7


def main(n):
    pre = 1
    for i in range(2, n + 1):
        pre = pre * i % mod_num
    return pre


ans = main(n)
print(ans)

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


def calc(n):
    pre = 1
    for i in range(1, n):
        pre = pre * i
    return pre * n % (pow(10, 9) + 7)


def main(n):
    ans = calc(n)    
    return ans


ans = main(n)
print(ans)


Fixed submission:
n = int(input())


mod_num = pow(10, 9) + 7


def main(n):
    pre = 1
    for i in range(2, n + 1):
        pre = pre * i % mod_num
    return pre


ans = main(n)
print(ans)

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


def calc(n):
    if n in (1, 2):
        return n
    else:
        pre = 1
        for i in range(1, n):
            pre = pre * i
        return pre * n % (pow(10, 9) + 7)


def main(n):
    ans = calc(n)    
    return ans


ans = main(n)
print(ans)

Fixed submission:
n = int(input())


mod_num = pow(10, 9) + 7


def main(n):
    pre = 1
    for i in range(2, n + 1):
        pre = pre * i % mod_num
    return pre


ans = main(n)
print(ans)
Buggy python submission (verdict: Runtime Error):
s, c = [int(e) for e in input().split()]


def main(s, c):
    ret = 0
    for i in range(s):
        ret += 1
        c   -= 2
    ret += c // 4
    return ret


ans = main(n)
print(ans)


Fixed submission:
s, c = [int(e) for e in input().split()]


def main(s, c):
    if s >= c // 2:
        return c // 2
    else:
        ret = s
        c -= s * 2
        ret += c // 4
        return ret


ans = main(s, c)
print(ans)
Buggy python submission (verdict: Runtime Error):
x = input()


if x < 1200:
    print("ABC")
else:
    print("ARC")

Fixed submission:
x = int(input())


if x < 1200:
    print("ABC")
else:
    print("ARC")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from copy import deepcopy


def main():
    problems = int(input())
    solve_times = [int(e) for e in input().split()]
    drinks = int(input())

    for i in range(drinks):
        solve_times_copy = deepcopy(solve_times_copy)
        problem_idx, solve_time = [int(e) for e in input().split()]
        problem_idx -= 1
        solve_times_copy[problem_idx] = solve_time
        print(sum(solve_times_copy))


main()


Fixed submission:
# -*- coding: utf-8 -*-
from copy import deepcopy


def main():
    problems = int(input())
    solve_times = [int(e) for e in input().split()]
    drinks = int(input())

    for i in range(drinks):
        solve_times_copy = deepcopy(solve_times)
        problem_idx, solve_time = [int(e) for e in input().split()]
        problem_idx -= 1
        solve_times_copy[problem_idx] = solve_time
        print(sum(solve_times_copy))


main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from copy import deepcopy


def main():
    problems = int(input())
    solve_times = [int(e) for e in input().split()]
    drinks = int(input())

    for i in range(drinks):
        solve_times_copy = deepcopy(solve_times_copy)
        problem_idx, solve_time = [int(e) for e in input().split()]
        problem_idx -= 1
        solve_times_copy[problem_idx] = solve_time
        print(sum(solve_times_copy))


print(main())


Fixed submission:
# -*- coding: utf-8 -*-
from copy import deepcopy


def main():
    problems = int(input())
    solve_times = [int(e) for e in input().split()]
    drinks = int(input())

    for i in range(drinks):
        solve_times_copy = deepcopy(solve_times)
        problem_idx, solve_time = [int(e) for e in input().split()]
        problem_idx -= 1
        solve_times_copy[problem_idx] = solve_time
        print(sum(solve_times_copy))


main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def list_n():
    return [int(e) for e in input().split()]


def list_s():
    return [s for e in input().split()]


def main(s):
    ret = []
    for c in s:
        if c in ['0', '1']:
            ret.append(c)
        else:
            if c:
                ret.pop()
    return ''.join(ret)


if __name__ == '__main__':
    s = input()
    print(main(s))


Fixed submission:
# -*- coding: utf-8 -*-

def list_n():
    return [int(e) for e in input().split()]


def list_s():
    return [s for e in input().split()]


def main(s):
    ret = []
    for c in s:
        if c in ['0', '1']:
            ret.append(c)
        else:
            if ret:
                ret.pop()
    return ''.join(ret)


if __name__ == '__main__':
    s = input()
    print(main(s))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n,m = map(int,input().split())
s = ""
for i in range(m):
    a,b = input().split()
    s = s + a + b
n_max = 5
for i in range(n_max):
    counter = Counter(s)
    if counter[str(i)] % 2 != 0:
        print("NO")
        break
if i == n_max -1:
    print("YES")

Fixed submission:
from collections import Counter

n,m = map(int,input().split())
s = ""
for i in range(m):
    s = s + input()
counter = Counter(s)
for i in range(n+1):
    if counter[str(i)] % 2 != 0:
        print("NO")
        break
if i == n:
    print("YES")
Buggy python submission (verdict: Runtime Error):
O = list(input())
E = list(input())
password = []
if len(O) - len(E) == 0:
    for i in range(len(O)):
        password.append(O[i])
        password.append(E[i])
elif len(O) - len(E) == 1:
    for i in range(len(E)):
        password.append(O[i])
        password.append(E[i])
    password.append(O[len(O)])
password = "".join(password)

print(password)

Fixed submission:
O = list(input())
E = list(input())
password = []
if len(O) - len(E) == 0:
    for i in range(len(O)):
        password.append(O[i])
        password.append(E[i])
elif len(O) - len(E) == 1:
    for i in range(len(E)):
        password.append(O[i])
        password.append(E[i])
    password.append(O[len(O)-1])
password = "".join(password)

print(password)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s0 = list(input())
s1 = list(input())
match = list((Counter(s0) & Counter(s1)).elements())
for i in range(n-2):
    s = list(input())
    match = list((Counter(match) & Counter(s)).elements())
match.sort()
print("".join(match))

Fixed submission:
from collections import Counter
n = int(input())
if n == 1:
    s0 = list(input())
    s0.sort()
    print("".join(s0))
else:
    s0 = list(input())
    s1 = list(input())
    match = list((Counter(s0) & Counter(s1)).elements())
    for i in range(n-2):
        s = list(input())
        match = list((Counter(match) & Counter(s)).elements())
    match.sort()
    print("".join(match))
Buggy python submission (verdict: Time Limit Exceeded):

a,b,x = map(int,input().split())
count = 0
for i in range(a,b+1):
    if i % x == 0:
        count += 1
print(count)

Fixed submission:
a,b,x = map(int,input().split())
count = 0
count = b//x - (a-1)//x

print(count)
Buggy python submission (verdict: Runtime Error):
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    for j in range(i,number):
        if a[i] ==j+1 and a[j] == i+1:
            count += 1
print(int(count))
    

Fixed submission:
s = input()
output=""
for i in range(4):
    output +=s[i]
output += " "
for i in range(8):
    output +=s[i+4]
print(output)
Buggy python submission (verdict: Time Limit Exceeded):
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    for j in range(i,number):
        if a[i] ==j+1 and a[j] == i+1:
            count += 1
print(int(count))

Fixed submission:
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    j = a[i]-1
    if a[j] == i + 1:
        count += 1
print(int(count/2))

Buggy python submission (verdict: Time Limit Exceeded):
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    for j in range(number):
        if a[i] ==j+1 and a[j] == i+1:
            count += 1
print(int(count/2))

Fixed submission:
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    j = a[i]-1
    if a[j] == i + 1:
        count += 1
print(int(count/2))

Buggy python submission (verdict: Runtime Error):
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    for j in range(number):
        if a[i] ==j+1 and a[j] == i+1:
            count += 1
print(int(count/2)

Fixed submission:
number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    j = a[i]-1
    if a[j] == i + 1:
        count += 1
print(int(count/2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N > 15:
    discount = N // 15
print(N * 800 - discount * 200)


Fixed submission:
N = int(input())
discount = 0
if N > 15:
    discount = N // 15
print(N * 800 - discount * 200)
Buggy python submission (verdict: Runtime Error):
import math
X = int(input())
n = math.sqrt(2*X) -1

def sum(a):
    x = 0
    for i in range(a+1):
        x += i
    return x

for i in range(n,X+1):
    if sum(i)>= X:
        result = i
        break

print(result)

Fixed submission:
import math
X = int(input())
n = int(math.sqrt(2*X) -2)

def sum(a):
    return a*(a+1)/2

result = 0

for i in range(n,X+1):
    if sum(i)>= X:
        result = i
        break

print(result)

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

def sum(a):
    x = 0
    for i in range(a+1):
        x += i
    return x

for i in range(1,X+1):
    if sum(i)>= X:
        result = i
        break

print(result)

Fixed submission:
import math
X = int(input())
n = int(math.sqrt(2*X) -2)

def sum(a):
    return a*(a+1)/2

result = 0

for i in range(n,X+1):
    if sum(i)>= X:
        result = i
        break

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P =1
for i in range(1,N+1):
    P*=i

print(P%1000000007)


Fixed submission:
N = int(input())
M = 1000000007
n=[1]*(N+1)
for i in range(1,N+1):
    n[i] = (n[i-1]*i)%M

print(n[N])

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

P=1
for i in range(1,N+1):
   P=P*i

print(P%1000000007)


Fixed submission:
N = int(input())
M = 1000000007
n=[1]*(N+1)
for i in range(1,N+1):
    n[i] = (n[i-1]*i)%M

print(n[N])
Buggy python submission (verdict: Time Limit Exceeded):
N, Ma, Mb = map(int,input().split())
a=[0]*N
b=[0]*N
c=[0]*N
for i in range(N):
    a[i], b[i], c[i] = map(int,input().split())

dp = [[[4001 for i in range(411)] for j in range(411)] for l in range(N+1)]

dp[0][0][0] = 0

for i in range(1,N+1):
    for j in range(400):
        for k in range(400):
            dp[i][j+a[i-1]][k+b[i-1]] = min(dp[i-1][j][k] + c[i-1],dp[i-1][j+a[i-1]][k+b[i-1]])
            dp[i][j][k] = min(dp[i - 1][j][k], dp[i][j][k])
s = min(400//Ma,400//Mb)

min = 4001
for i in range(1,s+1):
    x = dp[N][i*Ma][i*Mb]
    if x>0 and min > x:
        min = x

if min != 4001:
    print(min)
else:
    print(-1)


Fixed submission:
N, Ma, Mb = map(int,input().split())
a=[0]*N
b=[0]*N
c=[0]*N
for i in range(N):
    a[i], b[i], c[i] = map(int,input().split())

dp = [[[4001 for i in range(411)] for j in range(411)] for l in range(N+1)]

dp[0][0][0] = 0

for i in range(1,N+1):
    for j in range(400):
        for k in range(400):
            if dp[i-1][j][k] == 4001:
                continue
            dp[i][j+a[i-1]][k+b[i-1]] = min(dp[i-1][j][k] + c[i-1],dp[i-1][j+a[i-1]][k+b[i-1]])
            dp[i][j][k] = min(dp[i - 1][j][k], dp[i][j][k])
s = min(400//Ma,400//Mb)

min = 4001
for i in range(1,s+1):
    x = dp[N][i*Ma][i*Mb]
    if x>0 and min > x:
        min = x

if min != 4001:
    print(min)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
sum=1
if((a<0 and b>0) or a==0 or b==0):
    print("Zero")
elif(a>0):
    print("Positive")
else:
    for i in range(a,b+1):
        sum*=i
    if(sum>0):
        print("Positive")
    else:
        print("Negative")


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

if((a<0 and b>0) or a==0 or b==0):
    print("Zero")
elif(a>0):
    print("Positive")
else:
    if((((a-b)*-1)+1)%2==1):
        print("Negative")
    else:
        print("Positive")

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
sum=1
if((a<0 and b>0) or a==0 or b==0):
    print("Zero")
else:
    for i in range(a,b+1):
        sum*=i
    if(sum>0):
        print("Positive")
    else:
        print("Negative")


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

if((a<0 and b>0) or a==0 or b==0):
    print("Zero")
elif(a>0):
    print("Positive")
else:
    if((((a-b)*-1)+1)%2==1):
        print("Negative")
    else:
        print("Positive")

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
sum=1
for i in range(a,b+1):
    sum*=i
if(sum>0):
    print("Positive")
elif(sum==0):
    print("Zero")
else:
    print("Negative")


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

if((a<0 and b>0) or a==0 or b==0):
    print("Zero")
elif(a>0):
    print("Positive")
else:
    if((((a-b)*-1)+1)%2==1):
        print("Negative")
    else:
        print("Positive")
Buggy python submission (verdict: Runtime Error):
# coding: utf-8 
N,T = [int(i) for i in input().split(" ")]
array = input().split(" ")
ans = 0
fin = 0
for x in array:
    time = int(x)
    if time <= fin:
        ans += (time + T - fin)
    else:
        ans += T
    fin = time + T
print(ans)

Fixed submission:
# coding: utf-8 
array = input().split(" ")
flag = True
for i,s in enumerate(array[:(len(array)-1)]):
    if s[-1] != array[i+1][0]:
        flag = False
if flag is True:
    print("YES")
else:
    print("NO")

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print(ans)

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]]:
    print('YES')
else:
    print(ans)


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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

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

if a[len(a)-1] == b[0] and b[len(b)-1 == c[0]]:
    print('YES')
else:
    print(ans)

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

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

if a[len(a)-1] == b[0] and if b[len(b)-1 == c[0]]:
    print('YES')
else:
    print(ans)

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
l = input().split()
def shiritori (letter):
    if letter[0][-1:] == letter[1][:1]:
        if letter[1][-1:] == letter[2][:1]:
            return('YES')
        else return('NO')
    else return('NO')
shiritori(l)

Fixed submission:
l = input().split()
def shiritori (letter):
    if letter[0][-1:] == letter[1][:1]:
        if letter[1][-1:] == letter[2][:1]:
            return(print('YES'))
        else:
            return(print('NO'))
    else:
        return(print('NO'))
shiritori(l)
Buggy python submission (verdict: Runtime Error):
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(e)):
        s_vec3.append(o[i])
        s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))
print(abc_057_2(s_vec1,s_vec2))

Fixed submission:
n_vec = list(map(int, input().split()))
n1 = n_vec[0]
n2 = n_vec[1]
n3 = n_vec[2]
def abc_057_1(a,b,c):
    if b-a == c-b:
        return(print('YES'))
    else:
        return(print('NO'))
abc_057_1(n1,n2,n3)

Buggy python submission (verdict: Runtime Error):
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(e)):
        s_vec3.append(o[i])
        s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))  
abc_057_2(s_vec1,s_vec2)

Fixed submission:
n_vec = list(map(int, input().split()))
n1 = n_vec[0]
n2 = n_vec[1]
n3 = n_vec[2]
def abc_057_1(a,b,c):
    if b-a == c-b:
        return(print('YES'))
    else:
        return(print('NO'))
abc_057_1(n1,n2,n3)
Buggy python submission (verdict: Runtime Error):
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(o)):
    s_vec3.append(o[i])
    s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))    

Fixed submission:
s_vec1 = input()
s_vec2 = input()
def abc_057_2(o,e):
    s_vec3 = []
    for i in range(0,len(e)):
        s_vec3.append(o[i])
        s_vec3.append(e[i])
    if len(o) == len(e):
        pass
    else:
        s_vec3.append(o[i+1])
    return(''.join(s_vec3))
print(abc_057_2(s_vec1,s_vec2))
Buggy python submission (verdict: Runtime Error):
n_vec = list(map(int, input().split()))
n1 = n_vec[0]
n2 = n_vec[1]
n3 = n_vec[2]
def metricf1(w,a,b) :
    if (a+w < b) :
        return b-a-w
    elif (a-w <= b <= a+w) :
        return 0
    else :
        return a-b-w
print(metricf1(n1,n2,n3))

Fixed submission:
l_vec = input().split()
def classifier1(l) :
    if ((l[0] == 'H') and (l[1] == 'H')) or ((l[0] == 'D') and (l[1] == 'D')) :
        return 'H'
    else :
        return 'D'
print(classifier1(l_vec))
Buggy python submission (verdict: Runtime Error):
def sunuke_f3(n, m) :
    if n >= m :
        return(m//2)
    else :
        if 2*n < m :
            return(n + (m-2*n)//4)
        else :
            return(m//2)
sunuke_f3(N, M)

Fixed submission:
N, M = map(int, input().split(' '))
def sunuke_f3(n, m) :
    if n >= m :
        return(m//2)
    else :
        if 2*n < m :
            return(n + (m-2*n)//4)
        else :
            return(m//2)
print(sunuke_f3(N, M))
Buggy python submission (verdict: Runtime Error):
import math

N, M = map(int, raw_input().split())
a = []
for i in range(N+M):
    a.append(map(int, raw_input().split()))

b=[]

def mhtn(a,b,c,d):
    return 

for i in range(N):
    best=4*10e8
    num=0
    for j in range(M):
        x=math.fabs(a[i][0]-a[N+j][0])+math.fabs(a[i][1]-a[N+j][1])
        
        if(best>x):
            best=x
            num=j+1
    b.append(num)

for i in b:
    print i

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

time=(l[0]+l[1])%24

print time

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()

time=(l[0]+l[1])%24

print time

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

time=(l[0]+l[1])%24

print time
Buggy python submission (verdict: Runtime Error):
l = input().split()

if l[0]==l[1]:
    return "H"
else:
    return "D"

Fixed submission:
l = raw_input().split(" ")

if l[0]==l[1]:
    print "H"
else:
    print "D"
Buggy python submission (verdict: Runtime Error):
a=input();b=input();r=[];l=len(lb)
for i in range(l):
    r.append(a[i]); r.append(b[i])
if l != len(b):
    r.append(a[-1])
print(''.join(r))



Fixed submission:
ns=list(map(int, input().split()))
ns.sort()
if ns[0] + ns[2] == ns[1]*2:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a=input();b=input();r=[];l=len(lb)
for i in range(l):
    r.append(a[i]); r.append(b[i])
if l != len(a):
    r.append(a[-1])
print(''.join(r))

Fixed submission:
import sys
read=lambda:sys.stdin.readline().rstrip()
readi=lambda:int(sys.stdin.readline())
writeln=lambda x:sys.stdout.write(str(x)+"\n")
write=lambda x:sys.stdout.write(x)
a=read();b=read();la,lb=len(a),len(b);r=[]
for i in range(lb):
    r.append(a[i]);r.append(b[i])
if la != lb:
    r.append(a[-1])
print(''.join(r))

Buggy python submission (verdict: Runtime Error):
a=input();b=input();r=[];l=len(lb)
for i in range(l):
    r.append(a[i]); r.append(b[i])
if l != len(b):
    r.append(a[-1])
print(''.join(r))

Fixed submission:
import sys
read=lambda:sys.stdin.readline().rstrip()
readi=lambda:int(sys.stdin.readline())
writeln=lambda x:sys.stdout.write(str(x)+"\n")
write=lambda x:sys.stdout.write(x)
a=read();b=read();la,lb=len(a),len(b);r=[]
for i in range(lb):
    r.append(a[i]);r.append(b[i])
if la != lb:
    r.append(a[-1])
print(''.join(r))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

for i in range(b):
    if ((i+1) * a) % b == c:
        print('YES')
        exit(1)
print('NO')

Fixed submission:
a, b, c = map(int, input().split())
flag = True
for i in range(b):
    if ((i+1) * a) % b == c:
        print('YES')
        flag = False
        break
if flag:
    print('NO')