Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

words = []

for i in range(n):
    words.append(input())

words_s = sorted(list(set(words)))

most = []

max_count = 0

for i in words_s:
    a = words.count(i)
    if a > max_count:
        max_count = a
        most = []
        most.append(i)
    elif a == max_count:
        most.append(i)

for i in range(len(most)):
    print(most[i])

Fixed submission:
n = int(input())

words = [input() for _ in range(n)]

d = {}

for i in range(n):
    if words[i] not in d:
        d[words[i]] = 1
    else:
        d[words[i]] += 1

m = max(d.values())
ANS = []

for keys in d.keys():
    if d[keys] == m:
        ANS.append(keys)

ANS = sorted(ANS)

for i in ANS:
    print(i)

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

n = int(input())

words = []

for i in range(n):
    words.append(input())

words.sort()

count_w = {}

for key, value in groupby(words):
    count_w[key] = len(list(value))

for i in list(count_w.keys):
    if count_w[i] == max(list(count_w.values)):
        print(i)

Fixed submission:
n = int(input())

words = [input() for _ in range(n)]

d = {}

for i in range(n):
    if words[i] not in d:
        d[words[i]] = 1
    else:
        d[words[i]] += 1

m = max(d.values())
ANS = []

for keys in d.keys():
    if d[keys] == m:
        ANS.append(keys)

ANS = sorted(ANS)

for i in ANS:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = input().split()
num = []

for i in a:
    if i not in num:
        num.append(i)
    else:
        print("NO")
        break
else:
    print("YES")

Fixed submission:
n = int(input())
a = input().split()
num = []

a_s = list(set(a))

print("YES" if len(a) == len(a_s) else "NO")
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n, k = (int(x) for x in stdin.readline().rstrip().split())
p = [int(x) for x in stdin.readline().rstrip().split()]
ev = [((i*(i+1))/2)/i for i in p]

m = 0
for i in range(n-k+1):
    a = [ev[x] for x in range(i, i+k)]
    if m < sum(a):
        m = sum(a)

print(m)

Fixed submission:
from sys import stdin

n, k = (int(x) for x in stdin.readline().rstrip().split())
p = [int(x) for x in stdin.readline().rstrip().split()]
ev = [(i+1)/2 for i in p]
s = [ev[0]]
for i in range(1, n):
    s.append(s[i-1] + ev[i])

m = s[k-1]
for j in range(n-k):
    a = s[j+k] - s[j]
    if m < a:
        m = a

print(m)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n, k = (int(x) for x in stdin.readline().rstrip().split())
p = [int(x) for x in stdin.readline().rstrip().split()]

m = 0
s = 0
total = 0
for i in range(n-k+1):
    a = sum([p[i+x] for x in range(k)])
    if m <= a:
        m = a
        s = i

for i in range(k):
    b = sum([x for x in range(1, p[s+i] + 1)])
    total += b/p[s+i]

print(total)


Fixed submission:
from sys import stdin

n, k = (int(x) for x in stdin.readline().rstrip().split())
p = [int(x) for x in stdin.readline().rstrip().split()]
ev = [(i+1)/2 for i in p]
s = [ev[0]]
for i in range(1, n):
    s.append(s[i-1] + ev[i])

m = s[k-1]
for j in range(n-k):
    a = s[j+k] - s[j]
    if m < a:
        m = a

print(m)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))

total = 0

for i in range(n):
    count = 0
    for j in range(i + 1):
        if l[i] <= l[j]:
            count += 1
    if count == i + 1:
        total += 1

print(total)

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

total = 0
minl = l[0]

for i in l:
    if i <= minl:
        total += 1
        minl = i

print(total)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

eva = {}

ac = 0
wa = 0

for i in range(m):
    q, s = input().split()
    if eva[q] == "AC":
        pass
    else:
        if s == "AC":
            ac += 1
            eva[q] = "AC"
        else:
            wa += 1

print(ac, wa)


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

eva = [[0, 0] for _ in range(n)]

ac = 0
penalty = 0

for i in range(m):
    q, s = input().split()
    if eva[int(q) - 1][1] == 0:
        if s == "WA":
            eva[int(q) - 1][0] += 1
        else:
            eva[int(q) - 1][1] += 1
            ac += 1
            penalty += eva[int(q) - 1][0]
    else:
        pass

print(ac, penalty)

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

eva = [[0] for _ in range(n)]

ac = 0
wa = 0

for i in range(m):
    a = input().split()
    q = int(a[0])
    s = a[1]
    if "AC" in eva[q]:
        pass
    else:
        if s == "AC":
            ac += 1
            eva[q].append("AC")
        else:
            wa += 1
            eva[q] += 1

print(ac, wa)


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

eva = [[0, 0] for _ in range(n)]

ac = 0
penalty = 0

for i in range(m):
    q, s = input().split()
    if eva[int(q) - 1][1] == 0:
        if s == "WA":
            eva[int(q) - 1][0] += 1
        else:
            eva[int(q) - 1][1] += 1
            ac += 1
            penalty += eva[int(q) - 1][0]
    else:
        pass

print(ac, penalty)
Buggy python submission (verdict: Runtime Error):
k, x = map(int, input())

print("Yes" if 500*k >= x else "No")

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

print("Yes" if 500*k >= x else "No")
Buggy python submission (verdict: Runtime Error):
import math


def lcm(x, y):
    return (x*y) // math.gcd(x, y)


a, b = map(int, input().split())

print(lcm(a, b))


Fixed submission:
import fractions


def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)


a, b = map(int, input().split())

print(lcm(a, b))

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


def lcm(x, y):
    return (x*y) // gcd(x, y)


a, b = map(int, input().split())

print(lcm(a, b))


Fixed submission:
import fractions


def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)


a, b = map(int, input().split())

print(lcm(a, b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

nums = list(map(int, input().split()))
l = [int(x) for x in range(1, n + 1)]

i = 1
bb = 0
ANS = 1
while True:
    if (i == 1) and (nums == l):
        ANS = 0
        break
    if i in nums:
        i_index = nums.index(i)
        bb += len(nums[:i_index])
        nums = nums[i_index + 1:]
        i += 1
    else:
        bb += len(nums)
        break

if ((bb > 0) and bb != n) or ((ANS == 0)):
    print(bb)
else:
    print(-1)

Fixed submission:
n = int(input())

nums = list(map(int, input().split()))
l = [int(x) for x in range(1, n + 1)]

remain = [0]
count = 0

for i in nums:
    if i == remain[-1] + 1:
        remain.append(i)
    else:
        count += 1

if nums == l:
    print(0)
elif (count > 0) and (count != n):
    print(count)
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
from itertools import takewhile

n = int(stdin.readline().rstrip())
s = [1, 1]
for i in range(2, n+1):
    s.append(i*s[i-2])

s_r = list(reversed(str(s[-1])))
zeros = list(takewhile(lambda x: x == "0", s_r))
print(len(zeros))

Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
count = 0
a = n//2
b = 5

if n % 2 != 0:
    print(count)
else:
    while True:
        count += a//b
        if a//b == 0:
            break
        b *= 5

    print(count)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
from itertools import takewhile
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()

ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        ab = L[a] + L[b]
        c = list(takewhile(lambda x: x < ab, L[b+1:]))
        ans += len(c)

print(ans)

Fixed submission:
from sys import stdin
import bisect
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()

ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        c = bisect.bisect_left(L, L[a] + L[b])
        if c > b:
            ans += c - 1 - b

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
import itertools

n = int(stdin.readline().rstrip())
l = [int(x) for x in stdin.readline().rstrip().split()]
c = itertools.combinations(l, 3)

cnt = 0
for i in c:
    a, b, c = i[0], i[1], i[2]
    if (a < b + c) and (b < c + a) and (c < a + b):
        cnt += 1

print(cnt)

Fixed submission:
from sys import stdin
import bisect
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()

ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        c = bisect.bisect_left(L, L[a] + L[b])
        if c > b:
            ans += c - 1 - b

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

a_n = []
for i in range(1, n + 1):
    a_i = a.index(i) + 1
    a_n.append(a_i)

print(*a_n)

Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
a = {i + 1: int(x) for i, x in enumerate(stdin.readline().rstrip().split())}

a_sorted = sorted(a.items(), key=lambda x: x[1])

final = []
for i in range(n):
    final.append(a_sorted[i][0])

print(*final)
Buggy python submission (verdict: Runtime Error):
from sys import stdin

n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]

m = 0
count = 0
for i in range(n):
    if (i == n - 1) and (m < count):
        m = count
    else:
        if h[i] >= h[i + 1]:
            count += 1
        else:
            if m < count:
                m = count
            count = 0

print(m)


Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]

m = 0
count = 0
for i in range(n):
    if i == n - 1:
        if m < count:
            m = count
    else:
        if h[i] >= h[i + 1]:
            count += 1
        else:
            if m < count:
                m = count
            count = 0

print(m)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n = int(stdin.readline().rstrip())
l = [int(x) for x in range(1, n)]

print(sum(l))

Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
print((n - 1) * (n) // 2)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n = int(stdin.readline().rstrip())

total_m = sum([(i % (i + 1)) for i in range(1, n)])
print(total_m)


Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
print((n - 1) * (n) // 2)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n = int(stdin.readline().rstrip())
l = [int(x) for x in range(1, n + 1)]
p = l[1:] + [l[0]]

total_m = sum([i % p[i - 1] for i in range(1, n + 1)])
print(total_m)


Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
print((n - 1) * (n) // 2)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

N = int(stdin.readline().rstrip())
Ss = []
Sd = {}
ans = 0

for i in range(N):
    s = sorted([x for x in stdin.readline().rstrip()])
    ss = ("".join(s))
    if ss in Ss:
        ans += Sd[ss]
        Sd[ss] += 1
    else:
        Ss.append(ss)
        Sd[ss] = 1

print(ans)

Fixed submission:
from sys import stdin

N = int(stdin.readline().rstrip())
S = []
ans = 0
count = 0

for i in range(N):
    line = sorted([x for x in stdin.readline().rstrip()])
    line = ("".join(line))
    S.append(line)

S.sort()
for i in range(N):
    if (i == 0) or (S[i] == S[i - 1]):
        count += 1
    else:
        ans += count*(count - 1)//2
        count = 1
ans += count*(count - 1)//2

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

N = int(stdin.readline().rstrip())
Ss = []
ans = 0

for i in range(N):
    s = [x for x in stdin.readline().rstrip()]
    s.sort()
    if s in Ss:
        ans += Ss.count(s)
    Ss.append(s)

print(ans)

Fixed submission:
from sys import stdin

N = int(stdin.readline().rstrip())
S = []
ans = 0
count = 0

for i in range(N):
    line = sorted([x for x in stdin.readline().rstrip()])
    line = ("".join(line))
    S.append(line)

S.sort()
for i in range(N):
    if (i == 0) or (S[i] == S[i - 1]):
        count += 1
    else:
        ans += count*(count - 1)//2
        count = 1
ans += count*(count - 1)//2

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

n = int(stdin.readline().rstrip())
a = [int(stdin.readline().rstrip()) for _ in range(n)]

for i in range(n):
    if i == n - 1:
        ai = a[:i]
    else:
        ai = a[:i] + a[i+1:]
    print(max(ai))

Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
a = [int(stdin.readline().rstrip()) for _ in range(n)]

a_s = sorted(a)
m1 = a_s[-1]
m2 = a_s[-2]

for i in a:
    if i == m1:
        print(m2)
    else:
        print(m1)
Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int, input().split())

min = (L*R)%2019

for i in range(L, R):
    for j in range(i+1, R+1):
        mod = (i*j)%2019
        if mod < min:
            min = mod

print(min)

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

if (R-L) >= 2018:
    print(0)
else:
    ans = 2019
    for i in range(L, R):
        for j in range(i+1, R+1):
            ans = min(ans, (i*j)%2019)
    print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

a, b, c, d = (int(x) for x in stdin.readline().rstrip().split())

lcm = lcm(c, d)

total = b - (a - 1)
mc = b // c - (a - 1) // c
md = b // d - (a - 1) // d
mlcm = b // e - (a - 1) // e

print(total - (mc + md - mlcm))

Fixed submission:
from sys import stdin
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

a, b, c, d = (int(x) for x in stdin.readline().rstrip().split())

lcm = lcm(c, d)

total = b - (a - 1)
mc = b // c - (a - 1) // c
md = b // d - (a - 1) // d
mlcm = b // lcm - (a - 1) // lcm

print(total - (mc + md - mlcm))

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

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

length = b - a + 1
lc = a % c
rc = b % c
ld = a % d
rd = b % d
lcm = lcm(c, d)

ans = length
if (b < c) and (b < d):
    print(ans)
    sys.exit()

if length == c:
    ans -= length//c
if length == d:
    ans -= lenght//d

if length > c:
    temp = length//c
    if lc + rc >= c:
        temp += 1
    ans -= temp

if length > d:
    temp = length//d
    if ld + rd >= d:
        temp += 1
    ans -= temp

if length < c and ((lc > rc) or lc == 0 or rc == 0):
    ans -= 1
if length < d and ((ld > rd) or ld == 0 or rd == 0):
    ans -= 1

i = 1
while i * lcm <= b:
    if a <= i * lcm <= b:
        ans += 1
    i += 1

print(ans)

Fixed submission:
from sys import stdin
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

a, b, c, d = (int(x) for x in stdin.readline().rstrip().split())

lcm = lcm(c, d)

total = b - (a - 1)
mc = b // c - (a - 1) // c
md = b // d - (a - 1) // d
mlcm = b // lcm - (a - 1) // lcm

print(total - (mc + md - mlcm))
Buggy python submission (verdict: Runtime Error):
from sys import stdin

n = int(stdin.readline().rstrip())
w = [int(x) for x in stdin.readline().rstrip().split()]

ave = sum(w)/len(w)
w1 = [w.pop(0)]
while sum(w1)/len(w1) <= ave:
    w1.append(w.pop(0))

print(abs(sum(w1) - sum(w)))


Fixed submission:
from sys import stdin

n = int(stdin.readline().rstrip())
w = [int(x) for x in stdin.readline().rstrip().split()]

m = sum(w)

for i in range(n):
    w1 = w[:i]
    w2 = w[i:]
    wm = abs(sum(w1) - sum(w2))
    if wm < m:
        m = wm

print(m)
Buggy python submission (verdict: Runtime Error):
from sys import stdin

n, m = (int(x) for x in stdin.readline().rstrip().split())
lr = [stdin.readline().rstrip().split() for _ in range(m)]
l = max([i[0] for i in lr])
r = min([i[1] for i in lr])

if l <= r:
    print(r-l+1)
else:
    print(0)


Fixed submission:
from sys import stdin

n, m = (int(x) for x in stdin.readline().rstrip().split())
lr = [stdin.readline().rstrip().split() for _ in range(m)]
l = max([int(i[0]) for i in lr])
r = min([int(i[1]) for i in lr])

if l <= r:
    print(r-l+1)
else:
    print(0)

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

n, m = (int(x) for x in stdin.readline().rstrip().split())
s = int()
e = int()
for i in range(m):
    line = stdin.readline().rstrip().split()
    if i == 0:
        s = int(line[0])
        e = int(line[1])
    else:
        if s <= int(line[0]) <= e:
            s = int(line[0])
        if s <= int(line[1]) <= e:
            e = line[1]

print(len([i for i in range(s, e+1) if 1 <= i <= n]))


Fixed submission:
from sys import stdin

n, m = (int(x) for x in stdin.readline().rstrip().split())
lr = [stdin.readline().rstrip().split() for _ in range(m)]
l = max([int(i[0]) for i in lr])
r = min([int(i[1]) for i in lr])

if l <= r:
    print(r-l+1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    def chmin(i,j):
        dp[i] = min(dp[i], dp[i-j] + abs(h[i] - h[i-j]))

    N,K = (int(x) for x in input().split())
    h = [int(x) for x in input().split()]
    dp = [float('INF')]*N
    dp[0] = 0

    for i in range(1, N):
        if i <= K:
            for j in range(1, i+1):
                chmin(i,j)
        else:
            for j in range(1, K+1):
                chmin(i,j)
    print(dp[-1])

if __name__ == '__main__':
    main()

Fixed submission:
import numpy as np

def main():
    N, K = (int(x) for x in input().split())
    h = np.array([int(x) for x in input().split()])
    INF = 10**10
    dp = np.array([INF]*N)
    dp[0] = 0

    for i in range(N):
        dp[i:i+K+1] = np.minimum(dp[i:i+K+1], dp[i]+np.abs(h[i:i+K+1]-h[i]))

    print(int(dp[N-1]))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
  N = int(input())
  x = []
  for i in range(N):
    x.append(int(input())
  a = sorted(list(set(x)))
  print(len(a))
             
if __name__ == '__main__':
	main()

Fixed submission:
def main():
    N = int(input())
    x = []
    for i in range(N):
        x.append(int(input()))
    a = sorted(list(set(x)))
    print(len(a))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    s = input()
    for i in range(1<<3):
        t = int(s[0])
        op = []
        for j in range(3):
            if 1 & (i>>j):
                t += int(s[j+1])
                op.append('+')
            else:
                t -= int(s[j+1])
                op.append('-')
        if t == 7:
            x = [f'{a}{b}' for a,b in zip(s, op)]
            print(f'{"".join(x)}{s[-1]}=7')
            break

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    a = input()
    n = 3
    op = ['']*n
    for i in range(1 << n):
        total = int(a[0])
        for j in range(n):
            if 1 & (i >> j):
                total += int(a[j+1])
                op[j] = '+'
            else:
                total -= int(a[j+1])
                op[j] = '-'
        if total == 7:
            break
    ans = a[0]
    for i in range(n):
        ans += op[i]+a[i+1]
    ans += '=7'
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
K, S = map(int, input().split())

ANS = 0

for x in range(K + 1):
    for y in rage(K + 1):
        z = S - x - y
        if (0 <= z) and z <= K:
            ANS += 1

print(ANS)

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

ANS = 0

for x in range(K + 1):
    for y in range(K + 1):
        z = S - x - y
        if (0 <= z) and z <= K:
            ANS += 1

print(ANS)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())

count = 0

for i in range(K + 1):
    for j in range(K + 1):
        for k in range(K + 1):
            if i + j + k == S:
                count += 1

print(count)


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

ANS = 0

for x in range(K + 1):
    for y in range(K + 1):
        z = S - x - y
        if (0 <= z) and z <= K:
            ANS += 1

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

s = input()
n = [i for i in s]
ans = 0

for i in range(len(n)):
  for j in itertools.combinations(range(len(n)-1, i)):
    temp = [i for i in s]
    for k in j[::-1]:
      temp.insert(k+1, "+")
    temp = "".join(temp)
    temp = temp.split("+")
    temp = map(int, temp)
    ans += sum(temp)

print(ans)

Fixed submission:
import itertools

s = input()
n = [i for i in s]
ans = 0

for i in range(len(n)):
    for j in itertools.combinations(range(len(n)-1), i):
        temp = [i for i in s]
        for k in j[::-1]:
            temp.insert(k+1, "+")
        temp = "".join(temp)
        temp = temp.split("+")
        temp = map(int, temp)
        ans += sum(temp)

print(ans)
Buggy python submission (verdict: Runtime Error):
def main():
  N = int(input())
  print(sum([x for x in range(1,N+1)])

if __name__ == '__main__':
  main()

Fixed submission:
n = int(input())
a = [x for x in range(1,n+1)]
print(sum(a))
Buggy python submission (verdict: Runtime Error):
a, op, b = map(int, input().split())
op = str(op)
 
if p == "+":
  print(a+b)
else:
  print(a-b)

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

Buggy python submission (verdict: Runtime Error):
a, op, b = map(int, input().split())
op = str(op)
 
if op == "+":
  print(a+b)
else:
  print(a-b)

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

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

if p == "+":
  print(a+b)
else:
  print(a-b)

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
op = a[1]
x = a[0]
y = a[2]
 
if op == "+":
  print(x+y)
else:
  print(x-y)
  

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
op = a[1]
 
if op == "+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
op = a[1]

if op == "+":
  print(a[0]+a[2])
else:
  print(a[0]-a[2])

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
x = int(x[1])

print(x[0]x[1]x[2])

Fixed submission:
a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)
Buggy python submission (verdict: Runtime Error):
x = str(input())
if x = "a" or x = "i" or x = "u" or x = "e" or x = "o":
  print("vowel")
else:
  print("consonant")

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

Fixed submission:
a = list(map(str,input().split()))
x = a[1]
print("A"+ x[0] + "C")
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
if x[0]+x[1] == x[2] or x[1]+x[2] = x[0] or x[0]+x[2] == x[1]:
  print("YES")
else:
  print("NO")

Fixed submission:
x = list(map(int,input().split()))
a = x[0]
b = x[1]
c = x[2]

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

Fixed submission:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
 
if n>k:
    p = k*x + (n-k)*y
else:
    p = n*x
print(p)