Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

a, b, n = map(int, input().split())
x = np.arange(1,n+1)
fx = (x*a)//b - (x//b)*a
print(np.max(fx))

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

x = min(n,b-1)
ans = a*x//b - a*(x//b) 
print(ans)
Buggy python submission (verdict: Runtime Error):
x, y, z = map(int,input())
print(z, x, y)

Fixed submission:
x, y, z = map(int,input().split())
print(z, x, y)
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
d = np.array(read().split(), np.int64)

ans = len(np.unique(d))
print(ans)

Fixed submission:
s = list(input())
s[3] = '8'
ans = "".join(s)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = np.array(read().split(), np.int64)

ans = len(np.unique(d))
print(ans)

Fixed submission:
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
d = np.array(read().split(), np.int64)

ans = len(np.unique(d))
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
a = np.array(readline().split(), dtype=np.int64)

ans = 0
while np.all(a&1 == 0):
    a >>= 1 
    ans += 1
print(ans)

Fixed submission:
import sys
import numpy as np

readline = sys.stdin.readline

n = int(input())
a = np.array(readline().split(), dtype=np.int64)

ans = 0
while np.all(a&1 == 0):
    a >>= 1 
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
def sum_digits(n):
    s = 0
    while n:
        s += n%10
        n //= 10
    retun s

n = int(input())

ans = "Yes" if n % sum_digits(n) == 0 else "No"
print(ans)

Fixed submission:
def sum_digits(n):
    s = 0
    while n:
        s += n%10
        n //= 10
    return s

n = int(input())

ans = "Yes" if n % sum_digits(n) == 0 else "No"
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

a, b, c, d = input()

for i in range(2**3):
    op = ['','','']
    for j in range(3):
        if (i >> j) & 1:
            op[j] = '+'
        else:
            op[j] = '-'
        if eval(a + op[0] + b + op[1] + c + op[2] + d) == 7:
            print(a + op[0] + b + op[1] + c + op[2] + d + "=7")
            sys.exit()

Fixed submission:
import sys

a, b, c, d = input()

for i in range(2**3):
    op = ['','','']
    for j in range(3):
        if (i >> j) & 1:
            op[j] = '+'
        else:
            op[j] = '-'
    if eval(a + op[0] + b + op[1] + c + op[2] + d) == 7:
        print(a + op[0] + b + op[1] + c + op[2] + d + "=7")
        sys.exit()

Buggy python submission (verdict: Runtime Error):
import sys

a, b, c, d = input()

for i in range(2**3):
    op = ['','','']
    for j in range(len(3)):
        if (i >> j) & 1:
            op[j] = '+'
        else:
            op[j] = '-'
        if eval(a + op[0] + b + op[1] + c + op[2] + d) == 7:
            print(a + op[0] + b + op[1] + c + op[2] + d + "=7")
            sys.exit()

Fixed submission:
import sys

a, b, c, d = input()

for i in range(2**3):
    op = ['','','']
    for j in range(3):
        if (i >> j) & 1:
            op[j] = '+'
        else:
            op[j] = '-'
    if eval(a + op[0] + b + op[1] + c + op[2] + d) == 7:
        print(a + op[0] + b + op[1] + c + op[2] + d + "=7")
        sys.exit()
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

readline = sys.stdin.readline

n = int(input())
a = np.array(readline().split(),dtype=np.int64)
b = np.array(readline().split(),dtype=np.int64)
c = np.array(readline().split(),dtype=np.int64)

ans = 0
for i in range(n):
    ans += np.count_nonzero(a < b[i]) * np.count_nonzero(c > b[i])
print(ans)


Fixed submission:
c1 = list(input())
c2 = list(input())
ans = "YES" if c2 == c1[::-1] else "NO"
print(ans)

Buggy python submission (verdict: Runtime Error):
c1 = list(input())
c2 = list(input())
ans = "YES" if c2 = c2[::-1] else "NO"
print(ans)

Fixed submission:
c1 = list(input())
c2 = list(input())
ans = "YES" if c2 == c1[::-1] else "NO"
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

readline = sys.stdin.readline

n = np.array(readline().split(), dtype=np.int64)

a = np.array(list(np.unique(n, return_counts=True))).T
ans = a[:,0][np.where(a[:,1] == 1)]
print(*ans)

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

ans = a if b == c else b if c == a else c
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

read = sys.stdin.buffer.read

n = int(input())
p = np.array(read().split(), dtype=np.int64).reshape(-1,2)

ans = np.sum((p[:,1]-p[:,0])+1)
print(ans)

Fixed submission:
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
p = np.array(read().split(), dtype=np.int64).reshape(-1,2)

ans = np.sum((p[:,1]-p[:,0])+1)
print(ans)
Buggy python submission (verdict: Runtime Error):
import string

s = set(input())

a = set(string.ascii_lowercase)
b = a - c
ans = b[0] if len(b) else "None"
print(ans)

Fixed submission:
import string

s = set(input())

a = set(string.ascii_lowercase)
b = sorted(list(a - s))
ans = b[0] if len(b) else "None"
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
ans = max(0, min(b, d)) - max(a, c))
print(ans)

Fixed submission:
a, b, c, d = map(int, input().split())
ans = max(0, min(b, d) - max(a, c))
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
t = [int(input()) for i in range(n)]

ans = np.lcm.reduce(t)
print(ans)

Fixed submission:
import numpy as np
from fractions import gcd

def lcm(x, y):
    return (x*y) // gcd(x, y)
ufunc = np.frompyfunc(lcm,2,1)

n = int(input())
t = np.array([int(input()) for i in range(n)])

ans = ufunc.reduce(t)
print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
ans = (n-1)*(m-1)
print(ans))

Fixed submission:
n, m = map(int, input().split())
ans = (n-1)*(m-1)
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, iput().split())
ans = (n-1)*(m-1)
print(ans))

Fixed submission:
n, m = map(int, input().split())
ans = (n-1)*(m-1)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,10)
    if 2**i > n:
        print(2**(i-1))


Fixed submission:
n = int(input())
for i in range(1,10):
    if 2**i > n:
        print(2**(i-1))
        break
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input())
c = set()
d = set()
for i in range(m):
    a, b = map(int, input())
    if a == 1:
        c.add(b)
    if b == n:
        d.add(a)
ans = "POSSIBLE" if len(c & d) else "IMPOSSIBLE"

Fixed submission:
n, m = map(int, input().split())
c = set()
d = set()
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        c.add(b)
    if b == n:
        d.add(a)
ans = "POSSIBLE" if len(c & d) else "IMPOSSIBLE"
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import deque

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

b = deque()
for i in range(n):
    b.append(a[i])
    b.reverse()

print(*b)

Fixed submission:
a, b, c =  map(int, input().split())
ans = min(a+b, b+c, c+a)
print(ans)
Buggy python submission (verdict: Runtime Error):
s = deque(input())

while True:
    s.pop()
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break

Fixed submission:
s = list(input())

while True:
    s.pop()
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break
Buggy python submission (verdict: Runtime Error):
N = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, N+1):
    fact.append(fact[-1]*i%mod)

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

if n - m > 1 or m - n > 1:
    ans = 0
elif n - m == 0:
    ans = 2 * fact[n] * fact[m] % mod
else:
    ans = fact[n] * fact[m] % mod
    
print(ans)

Fixed submission:
x, a, b = map(int, input().split())
ans = "delicious" if b <= a else "dangerous" if b > a+x else "safe"
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
check = [0 for i in range(n)]
now = 0
ans = 0
while check[now] == 0:
    if now == 1:
        print(ans)
        break
    check[now] = 1
    now = a[now-1]
    ans += 1
else:
    print(-1)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
check = [0 for i in range(n)]
now = 1
ans = 0
while check[now-1] == 0:
    if now == 2:
        print(ans)
        break
    check[now-1] = 1
    now = a[now-1]
    ans += 1
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
check = [0 for i in rangen(n)]
now = 0
ans = 0
while check(now) != 0:
    if now == 1:
        print(ans)
        break
    check[now] = 1:
    now = a[now-1]
else:
    print(-1)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
check = [0 for i in range(n)]
now = 1
ans = 0
while check[now-1] == 0:
    if now == 2:
        print(ans)
        break
    check[now-1] = 1
    now = a[now-1]
    ans += 1
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
N = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, N+1):
    fact.append(fact[-1]*n%mod)


n, m = map(int, input())
ans = 0
if n - m > 1 or m - n > 1:
    ams = 0
elif n - m == 0:
    ans = 2 * (fact[n])**2
else:
    ans = fact[n] * fact[m)
print(ans)

Fixed submission:
N = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, N+1):
    fact.append(fact[-1]*i%mod)

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

if n - m > 1 or m - n > 1:
    ans = 0
elif n - m == 0:
    ans = 2 * fact[n] * fact[m] % mod
else:
    ans = fact[n] * fact[m] % mod
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, n+1):
    fact.sppend(fact[-1]*n%mod)


n, m = map(int, input())
ans = 0
if n - m > 1 or m - n > 1:
    ams = 0
elif n - m == 0:
    ans = 2 * (fact[n])**2
else:
    ans = fact[n] * fact[m)
print(ans)

Fixed submission:
N = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, N+1):
    fact.append(fact[-1]*i%mod)

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

if n - m > 1 or m - n > 1:
    ans = 0
elif n - m == 0:
    ans = 2 * fact[n] * fact[m] % mod
else:
    ans = fact[n] * fact[m] % mod
    
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

c = np.where(a < 3200, a//400, 8)
j = np.count_nonzero(c == 8)
ans = min(8, len(np.unique(c)) - 1 + j) if j else len(np.unique(c))
print(ans)

Fixed submission:
a = int(''.join(input().split()))
ans = "YES" if a%4 == 0 else "NO"
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [map(int, input().split())]
ans = max(a) - min(a)
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = max(a) - min(a)
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

n = int(input())
s = [int(input()) for i in range(n)]

s.sort()
p = np.sum(s)
if p%10 != 0:
    print(p)
    sys.exit()
for i in s:
    if i % 10 != 0:
        print(p - i)
        sys.exit()
print(0)

Fixed submission:
import sys

n = int(input())
s = [int(input()) for i in range(n)]

s.sort()
p = sum(s)
if p%10 != 0:
    print(p)
    sys.exit()
for i in s:
    if i % 10 != 0:
        print(p - i)
        sys.exit()
print(0)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n, m = map(int,input().split())
c = np.zeros(n)
for i in range(m)
    a, b = map(int,input().split())
    c[a-1] + 1
    c[b-1] + 1
for i in c:
    print(i)

Fixed submission:
a, b, c = map(int,input().split())
ans = 'Yes' if a <= c <= b else 'No'
print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m)
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in len(c):
    print(c[i])

Fixed submission:
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m):
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in range(n):
    print(c[i])

Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m)
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in c:
    print(i)

Fixed submission:
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m):
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in range(n):
    print(c[i])

Buggy python submission (verdict: Runtime Error):
import numpy as np
n, m = map(int,input().split())
c = np.zeros(n)
for i in range(m)
    a, b = map(int,input().split())
    c[a-1] + 1
    c[b-1] + 1
for i in c:
    print(i)

Fixed submission:
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m):
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in range(n):
    print(c[i])

Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
c = np.zeros(n)
for i in range(m)
    a, b = map(int,input().split())
    c[a-1] + 1
    c[b-1] + 1
for i in c:
    print(i)

Fixed submission:
n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m):
    a, b = map(int,input().split())
    c[a-1] += 1
    c[b-1] += 1
for i in range(n):
    print(c[i])
Buggy python submission (verdict: Runtime Error):
o = deque(input())
e = deque(input())

if len(o) > len(e):
    e.append('')
ans = ''

while len(o):
    ans += o.popleft()
    ans += e.popleft()
print(ans)

Fixed submission:
from collections import deque

o = deque(input())
e = deque(input())

if len(o) > len(e):
    e.append('')
ans = ''

while len(o):
    ans += o.popleft()
    ans += e.popleft()
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input())
ans = (a+b)%24
print(ans)

Fixed submission:
a, b = map(int, input().split())
ans = (a+b)%24
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
from scipy.spatial.distance import minkowski

n, m = map(int, input().split())
a = np.array([list(map(int, input().split())) for i in range(n)])
for i in range(m):
    b = np.array(list(map(int,input())))
    c = np.array([minkowski(i, b , 1) for i in a], dtype=np.int64)
    ans = np.argmin(c) + 1
    print(ans)

Fixed submission:
import numpy as np
from scipy.spatial.distance import minkowski

n, m = map(int, input().split())
a = np.array([list(map(int, input().split())) for i in range(n)])
b = np.array([list(map(int, input().split())) for i in range(m)])

for i in range(n):
    c = np.array([minkowski(a[i], j , 1) for j in b], dtype=np.int64)
    ans = np.argmin(c) + 1
    print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
x = int(input())
i = 1
while True:
    if i*(i+1)//2 >= x:
        print(i)
        sys.exit() 
    i += 1


Fixed submission:
a,b = input().split()
ans = 'H' if a == b else 'D'
print(ans)
Buggy python submission (verdict: Runtime Error):
w, a, b = map(int,input())
ans = 0
if b+w < a:
    ans = a - (b+w)
if a+w < b:
    ans = b - (a+w)
print(ans)

Fixed submission:
w, a, b = map(int,input().split())
ans = 0
if b+w < a:
    ans = a - (b+w)
if a+w < b:
    ans = b - (a+w)
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
x = int(input())
i = 1
while True:
    if i*(i+1)//2 >= x:
        print(i):
        sys.exit() 
    i += 1

Fixed submission:
import sys
x = int(input())
i = 1
while True:
    if i*(i+1)//2 >= x:
        print(i)
        sys.exit() 
    i += 1
Buggy python submission (verdict: Runtime Error):
n = int(input())
mod = 10**9 + 7
for i in range(1, n+1):
    ans *= i
    ans %= mod

print(ans)

Fixed submission:
n = int(input())
mod = 10**9 + 7
ans = 1
for i in range(1, n+1):
    ans *= i
    ans %= mod

print(ans)

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
@lru_cache(maxsize=None)
def fac(n, mod = 10**9+7):
    if n == 0:
        return 1
    else:
        return fac(n-1) * n % mod

n = int(input())
print(fac(n))

Fixed submission:
n = int(input())
mod = 10**9 + 7
ans = 1
for i in range(1, n+1):
    ans *= i
    ans %= mod

print(ans)
Buggy python submission (verdict: Runtime Error):
s = list(input())
s1 = list(dropwhile(lambda x: x != 'A',s))
s2 = list(dropwhile(lambda x: x != 'Z',s1[::-1]))
print(len(s2))

Fixed submission:
import itertools
s = list(input())
s1 = list(itertools.dropwhile(lambda x: x != 'A',s))
s2 = list(itertools.dropwhile(lambda x: x != 'Z',s1[::-1]))
print(len(s2))
Buggy python submission (verdict: Runtime Error):
x = list(input())
ans = (x//11) * 2 + 1 if x%11 <=5 else (x//11) * 2 + 2
print(ans)

Fixed submission:
x = int(input())
ans = (x//11)*2 if x%11 == 0 else (x//11)*2 + 1 if x%11 <= 6 else (x//11)*2 + 2
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = set(map, input().split())
ans = len(a) if len(a)%2 == n%2 else len(a)-1
print(ans)

Fixed submission:
n = int(input())
a = set(map(int,input().split()))
ans = len(a) if len(a)%2 == n%2 else len(a)-1
print(ans)
Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
s = list(input())
s1 = [1 if s[i] == 'I' else -1 for i in range(n)]
cumsum = list(itertools.accumulate(s1))
print(s1)
print(cumsum)
ans = max(cumsum)
print(max(ans, 0))

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

ans = max(a*b, c*d)
print(ans)
Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
s = list(input())
s1 = [1 if s[i] == 'I' else -1 for i in range(n)]
cumsum = list(itertools.accumulate(s1))
print(s1)
print(cumsum)
ans = max(cumsum)
print(max(ams, 0))

Fixed submission:
import itertools

n = int(input())
s = list(input())
s1 = [1 if s[i] == 'I' else -1 for i in range(n)]
cumsum = list(itertools.accumulate(s1))
ans = max(cumsum)
print(max(ans, 0))

Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
s = list(input())
s1 = [1 if s[i] == 'I' else -1 for i in range(n)]
cumsum = list(itertools.accumulate(s1))
print(s1)
print(cumsum)
ans = max(cumsum)
print(max(ams, 0))

Fixed submission:
import itertools

n = int(input())
s = list(input())
s1 = [1 if s[i] == 'I' else -1 for i in range(n)]
cumsum = list(itertools.accumulate(s1))
ans = max(cumsum)
print(max(ans, 0))
Buggy python submission (verdict: Runtime Error):
import sys
from collections import deque

mod = 10**9 + 7
n = int(input())
a = deque(sorted(list(map(int, (input().split())))))
if n % 2 == 0:
    for i in range(n//2):
        b = a.popleft()
        c = a.popleft()
        if b != i*2+1 or c != i*2+1:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))

if n % 2 == 1:
    if a.popleft() != 0:
        print(0)
        sys.exit()
    for i in range(n//2):
        b = a.popleft()
        c = a.popleft()
        if b != (i+1)*2 or c != (i+1)*2:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))

Fixed submission:
i = list(input().split())
if i[1] == '+':
    ans = int(i[0]) + int(i[2])
else:
    ans = int(i[0]) - int(i[2])
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, (input().split()))
time = sum(t)
m = int(input())
for i in range(m)
    p, x = map(int, input()/split())
    pritn(time - t[p+1] + x)

Fixed submission:
n = int(input())
t = list(map(int, (input().split())))
T = sum(t)
m = int(input())
for i in range(m):
    p, x = map(int, input().split())
    print(T - t[p-1] + x)
Buggy python submission (verdict: Runtime Error):
import sys
from collections import deque

mod = 10**9 + 7
n = int(input())
a = deque(sorted(list(map(int, (input().split())))))

if n % 2 == 0:
    for i in range(n//2):
        b = a.pop()
        c = a.pop()
        if b == (i+1)*2 and c = (i+1)*2:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))

if n % 2 == 1:
    if a.pop() != 0:
        print(0)
        sys.exit()
    for i in range(n//2):
        b = a.pop()
        c = a.pop()
        if b == (i+1)*2 and c = (i+1)*2:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))


Fixed submission:
import sys
from collections import deque


mod = 10**9 + 7
n = int(input())
a = deque(sorted(list(map(int, (input().split())))))
if n % 2 == 0:
    for i in range(n//2):
        b = a.popleft()
        c = a.popleft()
        if b != i*2+1 or c != i*2+1:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))

if n % 2 == 1:
    if a.popleft() != 0:
        print(0)
        sys.exit()
    for i in range(n//2):
        b = a.popleft()
        c = a.popleft()
        if b != (i+1)*2 or c != (i+1)*2:
            print(0)
            sys.exit()
    print(pow(2, n//2, mod))
Buggy python submission (verdict: Runtime Error):
c = input()
if c == ('a' or 'b' or 'c' or 'd' or 'e'):
    print(vowel)
else:
    print(consonant)


Fixed submission:
c = input()
if c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u':
    print("vowel")
else:
    print("consonant")
Buggy python submission (verdict: Runtime Error):
a, s, c = map(int,input().split())
print(a[0]+s[0]+c[0])

Fixed submission:
a, s, c = input().split()
print(a[0]+s[0]+c[0])
Buggy python submission (verdict: Runtime Error):
n = list(map(int,input().split()))
n.sorted()
if n[0] + n[1] == n[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
n = list(map(int,input().split()))
n.sort()
if n[0] + n[1] == n[2]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n = list(map(int,input()))
n.sorted()
if n[0] + n[1] == n[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
n = list(map(int,input().split()))
n.sort()
if n[0] + n[1] == n[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
from math import ceil,floor
import sys
n = int(input())
T = [0 for i in range(n)]
A = [0 for i in range(n)]
for i in range(n):
    T[i],A[i] = map(int,input().split())
t = 1
a = 1
for i in range(n):
    t = T[i]*max(ceil(t/T[i]), ceil(a/A[i]))
    a = A[i]*max(ceil(t/T[i]), ceil(a/A[i]))

print(t+a)

Fixed submission:
s =set(input().split())
print(len(s))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h//2
input(ans)


Fixed submission:
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h//2
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
K = int(input())
x = int(input())
y = int(input())

if n-k > 0:
    ans = x*k + y+(n-k)
    print(ans)
else:
    ans = x*n
    print(ans)

Fixed submission:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n-k > 0:
    ans = x*k + y*(n-k)
    print(ans)
else:
    ans = x*n
    print(ans)
Buggy python submission (verdict: Runtime Error):
vimport sys
w = input()
checker = set(w)
for i in checker:
    if w.count(i)%2 == 1:
        print("No")
        sys.exit()
print("Yes")

Fixed submission:
import sys
w = input()
checker = set(w)
for i in checker:
    if w.count(i)%2 == 1:
        print("No")
        sys.exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
h,w,a,b = map(int,input().split())
mod = 10**9 + 7
dp = [[0 for i in range(h+1)] for j in range(w+1)]
 
for i in range(w):
    for j in range(h):
        dp[i+1][j+1] = (dp[i][j+1] + dp[i+1][j])%mod
        if i == 0 and j == 0:
            dp[i+1][j+1] = 1
        if i < b and j >= h-a:
            dp[i+1][j+1] = 0
print(dp[w][h])

Fixed submission:
a = list(map(int,input().split()))
b = sorted(a)
if b == [5, 5, 7]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = sorted(a)
if b = [5, 5, 7]:
    print("YES")
else:
    print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = sorted(a)
if b == [5, 5, 7]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = sorted(a)3 
if b = [5, 5, 7]:
    print("YES")
else:
    print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = sorted(a)
if b == [5, 5, 7]:
    print("YES")
else:
    print("NO")