Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def func(n, a):
    mx = max(a)
    x = [0] * (mx + 1) # len(x)
    for i in a:
        x[i] += 1
    for i in range(1, mx + 1):
        if x[i] != 0:
            for j in range(2 * i, mx + 1, i):
                x[j] = 0
        if x[i] > 1:
            x[i] = 0
    return sum(x) # 31401

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


Fixed submission:
def func(n, a):
    mx = max(a)
    x = [0] * (mx + 1) # len(x)
    for i in a:
        x[i] += 1
    for i in range(1, mx + 1):
        if x[i] != 0:
            for j in range(2 * i, mx + 1, i):
                x[j] = 0
        if x[i] > 1:
            x[i] = 0
    print(sum(x)) # 31401

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

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


Fixed submission:
def func(n, a):
    mx = max(a)
    x = [0] * (mx + 1) # len(x)
    for i in a:
        x[i] += 1
    for i in range(1, mx + 1):
        if x[i] != 0:
            for j in range(2 * i, mx + 1, i):
                x[j] = 0
        if x[i] > 1:
            x[i] = 0
    print(sum(x)) # 31401

n = int(input())
a = list(map(int, input().split()))
func(n, a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
result = 1
for i in a:
    result *= i
    if i == 0:
        break
if result > 10**18:
    print(-1)
else:
    print(result)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
result = 1
overflow = False
for i in a:
    result *= i
    if result > 1e18:
        result = 1
        overflow = True
if result != 0 and overflow:
    print(-1)
else:
    print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
result = 1
for i in a:
    result *= i
if result > 10**18:
    print(-1)
else:
    print(result)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
result = 1
overflow = False
for i in a:
    result *= i
    if result > 1e18:
        result = 1
        overflow = True
if result != 0 and overflow:
    print(-1)
else:
    print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
result = 1
for i in a:
    result *= i
if result > 10**18:
    print(-1)
else:
    print(result)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
result = 1
overflow = False
for i in a:
    result *= i
    if result > 1e18:
        result = 1
        overflow = True
if result != 0 and overflow:
    print(-1)
else:
    print(result)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, n = map(int, input().split())

Max = 0
for x in range(1, n + 1):
    Max = max(Max, (a * x) // b - a * (x // b))
print(Max)


Fixed submission:
def f(a, b, n):
    if b == 1:
        print(0)
    else:
        Max = 0
        step = 1 if b // a ==  0 else b // a
        for x in range(b // a, n + step, step):
            res = (a * x) // b - a * (x // b)
            if res > Max:
                Max = res
        print(Max)

a, b, n = map(int, input().split()); f(a, b, n)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [0] * m
for i in range(m):
    a[i] = int(input())

ans = n - sum(a)
if ans > 0:
    print(ans)
else:
    print(-1)


Fixed submission:
# ABC163B

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

ans = n - sum(a)
if ans >= 0:
    print(ans)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
rom math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    t = gcd(a, b)
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(t, c)
print(total) # sample_02 1982 ms


Fixed submission:
# ABC162C

from fractions import gcd
from math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)

Buggy python submission (verdict: Runtime Error):
from fractions import gcd
from math import gcd

total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)


Fixed submission:
# ABC162C

from fractions import gcd
from math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)
Buggy python submission (verdict: Runtime Error):
from math import factorial

def choose(n, k):
    if n <= 0:
        return 0
    else:
        return factorial(n) // factorial(k) // factorial(n - k)

n, m = map(int, input().split())
print(choose(n, 2) + choose(m, 2))


Fixed submission:
from math import factorial

def choose(n, k):
    if n < k:
        return 0
    else:
        return factorial(n) // factorial(k) // factorial(n - k)

n, m = map(int, input().split())
print(choose(n, 2) + choose(m, 2))
Buggy python submission (verdict: Runtime Error):
def f(n, x):
    mean =  np.mean(x)
    s1 = sum((x-np.floor(mean))**2)
    s2 = sum((x-np.ceil(mean))**2)
    print(int(min(s1, s2)))

n = int(input())
x = list(map(int, input().split()))
f(n, x)


Fixed submission:
import numpy as np
def f(n, x):
    mean =  np.mean(x)
    s1 = sum((x-np.floor(mean))**2)
    s2 = sum((x-np.ceil(mean))**2)
    print(int(min(s1, s2)))

n = int(input())
x = list(map(int, input().split()))
f(n, x)
Buggy python submission (verdict: Runtime Error):
# ABC156D

import numpy as np
def f(n, x):
    mean =  np.mean(x)
    s1 = sum((x-np.floor(mean))**2)
    s2 = sum((x-np.ceil(mean))**2)
    print(int(min(s1, s2)))

n = int(input())
x = list(map(int, input().split()))
f(n, x)


Fixed submission:
from functools import reduce
def comb(n, r, mod=10 ** 9 + 7):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod

n, a, b = map(int, input().split())
mod = 1000000007
print((pow(2, n, mod) - 1 - comb(n, a, mod) - comb(n, b, mod)) % mod)
Buggy python submission (verdict: Runtime Error):
import numpy as np
def f(n, a):
    index, count = np.unique(a, return_counts=True)
    mx = max(count)
    for s in index[count == mx]:
        print(s)
    print(mx)

n = int(input())
a = [0] * n
for i in range(n):
    a[i] = input()
f(n, a)


Fixed submission:
d = {}
max_value = 1
n = int(input())
for i in range(n):
    t = input()
    if t in d.keys():
        d[t] += 1
        if d[t] > max_value:
            max_value = d[t]
    else:
        d.setdefault(t, 1)
#print(f"d = {d}")
#print(f"max_value = {max_value}")
#print(f"d.keys() = {d.keys()}")
#print(f"d.values() = {d.values()}")
d = sorted(d.items())
#print(d)
for k, v in d:
    if v == max_value:
        print(k)

Buggy python submission (verdict: Runtime Error):
import numpy as np
def f(n, a):
    index, count = np.unique(a, return_counts=True)
    mx = max(count)
    for s in index[count == mx]:
        print(s)
    print(mx)

n = int(input())
a = [0] * n
for i in range(n):
    a[i] = input()
f(n, a)


Fixed submission:
d = {}
max_value = 1
n = int(input())
for i in range(n):
    t = input()
    if t in d.keys():
        d[t] += 1
        if d[t] > max_value:
            max_value = d[t]
    else:
        d.setdefault(t, 1)
#print(f"d = {d}")
#print(f"max_value = {max_value}")
#print(f"d.keys() = {d.keys()}")
#print(f"d.values() = {d.values()}")
d = sorted(d.items())
#print(d)
for k, v in d:
    if v == max_value:
        print(k)

Buggy python submission (verdict: Runtime Error):
import numpy as np
def f(n, a):
    index, count = np.unique(a, return_counts=True)
    mx = max(count)
    for s in index[count == mx]:
        print(s)

n = int(input())
a = [0] * n
for i in range(n):
    a[i] = input()
f(n, a)


Fixed submission:
d = {}
max_value = 1
n = int(input())
for i in range(n):
    t = input()
    if t in d.keys():
        d[t] += 1
        if d[t] > max_value:
            max_value = d[t]
    else:
        d.setdefault(t, 1)
#print(f"d = {d}")
#print(f"max_value = {max_value}")
#print(f"d.keys() = {d.keys()}")
#print(f"d.values() = {d.values()}")
d = sorted(d.items())
#print(d)
for k, v in d:
    if v == max_value:
        print(k)
Buggy python submission (verdict: Runtime Error):
def f(n, a):
    if len(np.unique(a)) == a:
        print('YES')
    else:
        print('NO')

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

f(n, a)


Fixed submission:
import numpy as np
def f(n, a):
    if len(np.unique(a)) == n:
        print('YES')
    else:
        print('NO')

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

f(n, a)

Buggy python submission (verdict: Runtime Error):
import numpy as np
def f(n, a):
    b = np.subtract.outer(a, a)
    c = np.triu(np.ones_like(b), 1) > 0
    if any(b[c] == 0):
        print('NO')
    else:
        print('YES')


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

f(n, a)


Fixed submission:
import numpy as np
def f(n, a):
    if len(np.unique(a)) == n:
        print('YES')
    else:
        print('NO')

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

f(n, a)
Buggy python submission (verdict: Time Limit Exceeded):
def f(h):
    #print(f"h = {h}")
    count = 0
    while len(h):
        n = h.count(1)
        if n:
            h.pop(h.index(1))
            count += 1
        if len(h) and h[0] > 1:
            new = h.pop(0) // 2
            h.append(new)
            h.append(new)
            count += 1
    return count

h = [int(input())]
print(f(h))



Fixed submission:
def f(h):
    return 0 if h==0 else 1 + 2*f(int(h/2))

h = int(input())
print(f(h))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))
count = 0
for i in range(n):
    for j in range(i+1):
        if p[i] > p[j]:
            break
    else:
        count += 1
print(count)


Fixed submission:
n = int(input())
p = list(map(int, input().split()))
count = 0
min_val = p[0]
for i in range(n):
    if min_val >= p[i]:
        min_val = p[i]
    if min_val >= p[i]:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
from math import factorial
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
ans = 0
while n > 1:
    o = s[0]
    ans += (o - 1) * factorial(n - 1, True)
    s.pop(0)
    n = len(s)
    if n == 0:
        break
    s = [i if i < o else i - 1 for i in s]
print(ans)


Fixed submission:
from math import factorial

def ABC150C(s):
    n = len(s)
    ans = 0
    while n > 1:
        o = s[0]
        ans += (o - 1) * factorial(n - 1)
        s.pop(0)
        n = len(s)
        if n == 0:
            break
        s = [i if i < o else i - 1 for i in s]
    return ans

n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
print(abs(ABC150C(p) - ABC150C(q)))

Buggy python submission (verdict: Runtime Error):
# ABC150C

n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
ans = 0
while n > 1:
    o = s[0]
    ans += (o - 1) * factorial(n - 1, True)
    s.pop(0)
    n = len(s)
    if n == 0:
        break
    s = [i if i < o else i - 1 for i in s]
return ans


Fixed submission:
from math import factorial

def ABC150C(s):
    n = len(s)
    ans = 0
    while n > 1:
        o = s[0]
        ans += (o - 1) * factorial(n - 1)
        s.pop(0)
        n = len(s)
        if n == 0:
            break
        s = [i if i < o else i - 1 for i in s]
    return ans

n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
print(abs(ABC150C(p) - ABC150C(q)))
Buggy python submission (verdict: Runtime Error):
# ABC148B

n = int(input)
s, t = input().split()
print(''.join([i+j for i, j in zip(s, t)]))


Fixed submission:
# ABC148B

n = int(input())
s, t = input().split()
print(''.join([i+j for i, j in zip(s, t)]))

Buggy python submission (verdict: Runtime Error):
# ABC148B

n = int(input)
s = input()
t = input()
print(''.join([i+j for i, j in zip(s, t)]))


Fixed submission:
# ABC148B

n = int(input())
s, t = input().split()
print(''.join([i+j for i, j in zip(s, t)]))
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a = list(map(int, input().split())))
print(np.argsort(a)+1)


Fixed submission:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
print(*(np.argsort(a)+1))
Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
A = [0] * q
for i in range(q):
    A[i] = int(input())
score = [k] * n
for a in A:
    for i in range(n):
        if i != a-1:
            score[i] -= 1
for i in range(n):
    if score[i] <= 0:
        print('No')
    else:
        print('Yes')

Fixed submission:
n, k, q = map(int, input().split())
A = [0] * q
for i in range(q):
    A[i] = int(input())
score = [k - q] * n
for a in A:
    score[a-1] += 1
# print(score)
for i in range(n):
    if score[i] <= 0:
        print('No')
    else:
        print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = list(map(int, input().split()))
Max = 0
for start in range(n-1):
    count = 0
    for i in range(start+1, n):
        if h[i] <= h[i-1]:
            count += 1
        else:
            break
    Max = max(Max ,count)
print(Max)


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

Max = 0
start = 0
# cnt = 0
while start < n-1:
    # print(f"start = {start}")
    # cnt += 1
    count = 0
    for i in range(start+1, n):
        if h[i] <= h[i-1]:
            count += 1
        else:
            break
    Max = max(Max ,count)
    start = i
    # if cnt > 10:
    #     break
print(Max)
Buggy python submission (verdict: Runtime Error):
from math import factorial
n = int(input())
k = int(input())
print(factorial(n+k-1)//factorial(k)//factorial(n-1) % 1000000007)


Fixed submission:
# ABC137A

a, b = map(int, input().split())
print(max(a+b, a-b, a*b))

Buggy python submission (verdict: Runtime Error):
from math import factorial
n = int(input())
k = int(input())
print(factorial(n+k-1)//factorial(k)//factorial(n-1) % 1000000007)


Fixed submission:
# ABC137A

a, b = map(int, input().split())
print(max(a+b, a-b, a*b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
s = sorted(s)
s = sorted([''.join(sorted(list(t))) for t in s])
count = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        if s[j] > s[i]:
            break
        elif s[j] == s[i]:
            count += 1
print(count)


Fixed submission:
from math import factorial

def unique(w):
    d = {}
    for c in w:
        if c in d.keys():
            d[c] += 1
        else:
            d.setdefault(c, 1)
    return list(d.values())

n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
# s = sorted([''.join(sorted(list(t))) for t in s])
s = [''.join(sorted(list(t))) for t in s]
values = unique(s)
count = 0
for i in values:
    if i > 1:
        count += factorial(i) // factorial(2) // factorial(i - 2)
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
# ABC137C

n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
s = [sorted(list(t)) for t in s]
count = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        count += s[i] == s[j]
print(count)


Fixed submission:
from math import factorial

def unique(w):
    d = {}
    for c in w:
        if c in d.keys():
            d[c] += 1
        else:
            d.setdefault(c, 1)
    return list(d.values())

n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
# s = sorted([''.join(sorted(list(t))) for t in s])
s = [''.join(sorted(list(t))) for t in s]
values = unique(s)
count = 0
for i in values:
    if i > 1:
        count += factorial(i) // factorial(2) // factorial(i - 2)
print(count)
Buggy python submission (verdict: Runtime Error):
# ABC136B

n = int(input())
if n <= 9:
    print(n)
elif n <= 99:
    print(9)
elif n <= 999:
    print(9 + n - 99)
elif n <= 9999:
    print(909
elif n <= 99999:
    print(909 + n - 9999)
else:
    print(90909)


Fixed submission:
# ABC136B

n = int(input())
if n <= 9:
    print(n)
elif n <= 99:
    print(9)
elif n <= 999:
    print(9 + n - 99)
elif n <= 9999:
    print(909)
elif n <= 99999:
    print(909 + n - 9999)
else:
    print(90909)
Buggy python submission (verdict: Runtime Error):
# ABC001A

n, d = map(int, input().split())
print(sp.ceil(n / (2 * d + 1)))


Fixed submission:
# ABC001A

n, d = map(int, input().split())
print(-(-n // (2 * d + 1)))
Buggy python submission (verdict: Runtime Error):
# ABC131A

s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')


Fixed submission:
# ABC131B

import numpy as np
n, l = map(int, input().split())
x = l+np.arange(n)
print(sum(x) - x[np.argmin(abs(x))])
Buggy python submission (verdict: Runtime Error):
# ABC131C

def euclid(m, n):
    m0 = m = abs(m)
    n0 = n = abs(n)
    while n != 0:
        m, n = n, m % n
    qm = m0 // m
    lcm = qm * n0
    return lcm


def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, lcm(c, d))
print(b - a + 1 -(nc + nd - ncd))


Fixed submission:
# ABC131C

def euclid(m, n):
    m0 = m = abs(m)
    n0 = n = abs(n)
    while n != 0:
        m, n = n, m % n
    qm = m0 // m
    lcm = qm * n0
    return lcm


def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, euclid(c, d))
print(b - a + 1 -(nc + nd - ncd))

Buggy python submission (verdict: Runtime Error):
# ABC131C

def euclid(m, n):
    m0 = m = abs(m)
    n0 = n = abs(n)
    while n != 0:
        m, n = n, m % n
    qm = m0 // m
    lcm = qm * n0
    return lcm


def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, sp.lcm(c, d))
print(b - a + 1 -(nc + nd - ncd))


Fixed submission:
# ABC131C

def euclid(m, n):
    m0 = m = abs(m)
    n0 = n = abs(n)
    while n != 0:
        m, n = n, m % n
    qm = m0 // m
    lcm = qm * n0
    return lcm


def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, euclid(c, d))
print(b - a + 1 -(nc + nd - ncd))

Buggy python submission (verdict: Runtime Error):
# ABC131C

def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, sp.lcm(c, d))
print(b - a + 1 -(nc + nd - ncd))


Fixed submission:
# ABC131C

def euclid(m, n):
    m0 = m = abs(m)
    n0 = n = abs(n)
    while n != 0:
        m, n = n, m % n
    qm = m0 // m
    lcm = qm * n0
    return lcm


def check(a, b, c):
    x = a // c
    y = b // c
    if x * c < a:
        x += 1
    return y - x + 1

a, b, c, d = map(int, input().split())
nc = check(a, b, c)
nd = check(a, b, d)
ncd = check(a, b, euclid(c, d))
print(b - a + 1 -(nc + nd - ncd))
Buggy python submission (verdict: Runtime Error):
# ABC130B

n, x = map(int, input().split())
l = list(map(int, input().split()))
s = 0
for i in range(n):
    s += l[i]
    if s > x:
        return i+1
return n+1


Fixed submission:
# ABC130B

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

a, b = map(int, input().split()
if a >= 13:
    print(b)
elif a >= 6:
    print(b / 2)
else:
    print(0)


Fixed submission:
# ABC127A

a, b = map(int, input().split())
if a >= 13:
    print(b)
elif a >= 6:
    print(b // 2)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
# ABC126B

s = input()
aa = s // 100
bb = s %  100
if 1 <= aa and aa <= 12:
    if 1 <= bb and bb <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1 <= bb and bb <= 12:
        print('YYMM')
    else:
        print('NA')


Fixed submission:
# ABC126B

s = int(input())
aa = s // 100
bb = s %  100
if 1 <= aa and aa <= 12:
    if 1 <= bb and bb <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1 <= bb and bb <= 12:
        print('YYMM')
    else:
        print('NA')
Buggy python submission (verdict: Runtime Error):
# ABC125B

n = int(input())
x = 0
y = 0
for i in range(n):
    v, c = map(int, input().split())
    if v > c:
        x += v
        y += c
print(abs(x - y))


Fixed submission:
# ABC125B

n = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
x = 0
y = 0
for v, c in zip(V, C):
    if v > c:
        x += v
        y += c
print(abs(x - y))

Buggy python submission (verdict: Runtime Error):
# ABC125B

n = int(input())
v = list()
c = list(map(int, input().split()))
x = 0
y = 0
for i in range(n):
    v, c = map(int, input().split())
    if v > c:
        x += v
        y += c
print(abs(x - y))


Fixed submission:
# ABC125B

n = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
x = 0
y = 0
for v, c in zip(V, C):
    if v > c:
        x += v
        y += c
print(abs(x - y))
Buggy python submission (verdict: Runtime Error):
# ABC124C

s = input()
s = [int(t) for t in list(s)]
repaint = 0
for i in range(1, len(s)):
    if s[i-1] == s[i]:
        repaint += 1
        s[i] = 1 - s[i]
paint(repaint)


Fixed submission:
# ABC124C

s = input()
s = [int(t) for t in list(s)]
repaint = 0
for i in range(1, len(s)):
    if s[i-1] == s[i]:
        repaint += 1
        s[i] = 1 - s[i]
print(repaint)
Buggy python submission (verdict: Runtime Error):
# ABC123A

import numpy as np
a = [0] * 5
for i in range(5):
    a[i] = int(input())
k = int(input())
a = np.array(a)
print(":(" if np.sum(abs(np.subtract.outer(a, a)) > k) > 0 else "Yay!")

ABC123A([1,2,4,8,9], 15)
ABC123A([15, 18, 26, 35, 36], 18)


Fixed submission:
# ABC123A

import numpy as np
a = [0] * 5
for i in range(5):
    a[i] = int(input())
k = int(input())
a = np.array(a)
print(":(" if np.sum(abs(np.subtract.outer(a, a)) > k) > 0 else "Yay!")
Buggy python submission (verdict: Runtime Error):
# ABC121A

H, W, h, w = map(int, input().split())
#print(H*W-h*W-H*w+ h*w)
print((H-h)*(W-w))


Fixed submission:
# ABC121A

H, W = map(int, input().split())
h, w = map(int, input().split())
#print(H*W-h*W-H*w+ h*w)
print((H-h)*(W-w))