Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

C=0

for i in range(N):
	for n in range(N):
	  if A[i]==A[n]:
	  	C=C+1
	  else:
	  	C=C+0

if C==N:
	print('YES')
else:
	print('NO')


Fixed submission:
N = int(input())
A = list(map(int,input().split()))

C=0

A.sort()

for i in range(N-1):
    if A[i] == A[i+1]:
        C = C+1
    else:
        C = C

if C == 0:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

C=0

for i in range(N-1):
	if A.count(A[i])==1:
		C=C+0
	else:
		C=C+1

if C==0:
	print('YES')
else:
	print('NO')


Fixed submission:
N = int(input())
A = list(map(int,input().split()))

C=0

A.sort()

for i in range(N-1):
    if A[i] == A[i+1]:
        C = C+1
    else:
        C = C

if C == 0:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

C=0

for i in range(N-1):
	if A.count(A[i-0])==1:
		C=C+0
	else:
		C=C+1

if C==0:
	print('YES')
else:
	print('NO')


Fixed submission:
N = int(input())
A = list(map(int,input().split()))

C=0

A.sort()

for i in range(N-1):
    if A[i] == A[i+1]:
        C = C+1
    else:
        C = C

if C == 0:
	print('YES')
else:
	print('NO')
Buggy python submission (verdict: Runtime Error):
N, X, M = [int(v) for v in input().split()]

def f(a):
    return a * a % M


a = X

map = {}
ary = [a]
map[a] = 1

sub = [0, a]
last_sub = a

def naive(a):
    total = a
    ary = [a]
    for i in range(1, N):
        a = f(a)
        ary.append(a)
    return ary
    
#n_ary = naive(X)
#print(n_ary)
#print(sum(n_ary))

count = 1
for i in range(1, N):
    a = f(a)
    if a == 0:
        break
    if a in map:
        break
    else:
        map[a] = i
    count += 1
    last_sub += a
    sub.append(last_sub)

if a == 0:
    print(sub[-1])
    exit()

j = map[a]

#print(sub)
#print(j)
unit = sub[-1] - sub[j]
#print(unit)

l = count
i = (N - j) % (l - j)
d = (N - j) // (l - j)

#i = N % l
#d = N // l

#print(len(sub), i, j)
print(unit * d + sub[i + j])

#print(sub[-1] * (d + 1) * d // 2 + sub[i])


Fixed submission:
N, X, M = [int(v) for v in input().split()]

def f(a):
    return a * a % M

a = X

map = {}
ary = [a]
map[a] = 0

sub = [0, a]
last_sub = a

count = 1
for i in range(1, N):
    a = f(a)
    if a == 0:
        break
    if a in map:
        break
    else:
        map[a] = i
    count += 1
    last_sub += a
    sub.append(last_sub)

if a == 0:
    print(sub[-1])
    exit()


def naive(a):
    total = a
    ary = [a]
    for i in range(1, N):
        a = f(a)
        ary.append(a)
    return ary
    
#n_ary = naive(X)
#print(n_ary)
#print(sum(n_ary))

j = map[a]

#print(sub)
#print(j)

unit = sub[-1] - sub[j]
#print(unit)

l = count
i = (N - j) % (l - j)
d = (N - j) // (l - j)

#i = N % l
#d = N // l

#print(len(sub), i, j)
print(unit * d + sub[i + j])

#print(sub[-1] * (d + 1) * d // 2 + sub[i])
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, X, Y = map(int, input().split())
    X -= 1
    Y -= 1

    print(N)
    for k in range(2, N):
        ans = 0
        for i in range(N):
            ans += sum(1 for j in range(i + 1, N)
                       if min(j - i, abs(i - X) + abs(j - Y) + 1) == k)
        print(ans)


main()


Fixed submission:
def main():
    N, X, Y = map(int, input().split())
    X -= 1
    Y -= 1

    print(N)
    dist = [0] * (N + 1)

    for i in range(N):
        for j in range(i + 1, N):
            d = min(j - i, abs(i - X) + abs(j - Y) + 1)
            dist[d] += 1

    for k in range(2, N):
        print(dist[k])


main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, X, Y = map(int, input().split())
    X -= 1
    Y -= 1

    for k in range(1, N):
        ans = sum(sum(1 for j in range(i + 1, N)
                      if min(j - i, abs(i - X) + abs(j - Y) + 1) == k) for i in range(N))
        print(ans)


main()


Fixed submission:
def main():
    N, X, Y = map(int, input().split())
    X -= 1
    Y -= 1

    print(N)
    dist = [0] * (N + 1)

    for i in range(N):
        for j in range(i + 1, N):
            d = min(j - i, abs(i - X) + abs(j - Y) + 1)
            dist[d] += 1

    for k in range(2, N):
        print(dist[k])


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


def main():
    if c - a - b < 0:
        print('No')
    if 4 * a * b < (c - a - b) * (c - a - b):
        print('Yes')
    else:
        print('No')


main()


Fixed submission:
from math import sqrt


def main():
    a, b, c = map(int, input().split())
    if c - a - b < 0:
        print('No')
        exit()

    if 4 * a * b < (c - a - b) * (c - a - b):
        print('Yes')
    else:
        print('No')


main()
Buggy python submission (verdict: Time Limit Exceeded):
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

#a, b = [int(v) for v in input().split()]

n = int(input())
n0 = n


count = 0
while n > 0:
    #print(n, count)
    v = n % 10
    n //= 10
    if v < 5:
        count += v
    elif v == 5:
        if (n % 10) >= 5:
            n += 1
        count += 5
    else:
        count += 10 - v
        n += 1
print(count)


Fixed submission:
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

#a, b = [int(v) for v in input().split()]

n = input()

flag = 0
count = 0
for i in range(len(n) - 1, -1, -1):
    c = n[i]
    v = int(c) + flag

    if v == 10:
        v = 0
        flag = 1
    else:
        flag = 0
    if v < 5:
        count += v
    elif v == 5:
        if i != 0 and int(n[i-1]) >= 5:
            flag = 1
        count += 5
    else:
        count += 10 - v
        flag = 1
print(count + flag)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(v) for v in input().split()]

def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1 % v2)

a1 = A[0]

for a2 in A[1:]:
    a3 = gcd(a1, a2)
    a1 = a1 * a2 // a3

#print(a1)

v = a1
total = 0
for a in A:
    total += v // a 
    total %= 1000000007
    #while total > 1000000007:
    #total -= 1000000007

print(total)

Fixed submission:
N = int(input())
A = [int(v) for v in input().split()]

def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1 % v2)

A.sort()
a1 = A[0]

for a2 in A[1:]:
    a3 = gcd(a1, a2)
    a1 = a1 * a2 // a3

v = a1
total = 0
for a in A:
    total += v // a 
#    while total > 1000000007:
#        total -= 1000000007

total %= 1000000007
print(total)
Buggy python submission (verdict: Runtime Error):
s = input()

print(s[0] + 1)

Fixed submission:
s = input()

print(chr(ord(s[0]) + 1))
Buggy python submission (verdict: Runtime Error):
n, m = [int(v) for v in input().split()]

count_map = [0] * m

count = 0
miss = 0
for i in range(m):
	p, s = input().split()
    
    if count_map[p] == True:
      continue
    
    if s == 'AC':
	    count_map[p] = True
        count += 1
    else:
      	miss += 1
      
print(count, miss)




Fixed submission:
n, m = [int(v) for v in input().split()]

count_map = [0] * (n + 1)
miss_map = [0] * (n + 1)

count = 0
miss = 0
for i in range(m):
    p, s = input().split()
    p = int(p)

    if count_map[p]:
        continue

    if s == 'AC':
        count_map[p] = True
        count += 1
        miss += miss_map[p]
    else:
        miss_map[p] += 1

print(count, miss)
Buggy python submission (verdict: Runtime Error):
input()
s = input()

check = ['A', 'B', 'C']

count = 0
state = 0
for c in list(s):
	if c != check[state]:
      state = 0
      continue
    
    state += 1
    if state >= len(check):
      count += 1
      state = 0

print(count)

Fixed submission:
_ = input()
s = input()

check = ['A', 'B', 'C']

count = 0
state = 0

for i in range(len(s)):
    c = s[i]
    if c != check[state]:
        if c == check[0]:
            state = 1
        else:
            state = 0
        continue
    
    state += 1
    if state == 3:
        count += 1
        state = 0

print(count)
Buggy python submission (verdict: Runtime Error):
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    N, M = [int(v) for v in input().split()]
    A = list(set([int(v) // 2 for v in input().split()]))

    def gcd(v1, v2):
        while v1 % v2 != 0:
            tmp = v2
            v2 = v1 % v2
            v1 = tmp
        return v2

    def lcm(v1, v2):
        return v1 * v2 // gcd(v1, v2)

    alcm = 1
    for a in A:
        d = gcd(alcm, a)
        lcm = lcm * a // d
        if alcm > M:
            print(0)
            exit()

    # a_lcm = reduce(lambda v1, v2: lcm(v1, v2), A)

    if a_lcm > M:
        print(0)
    else:
        print((M // a_lcm + 1) // 2)


main()


Fixed submission:
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    N, M = [int(v) for v in input().split()]
    A = list(set([int(v) // 2 for v in input().split()]))

    def func(a):
        count = 0
        while a % 2 == 0:
            count += 1
            a //= 2
        return count

    fa = func(A[0])
    for a in A[1:]:
        if func(a) != fa:
            print(0)
            exit()

    def gcd(a, b):
        if b == 0:
            return a
        return gcd(b, a % b)

    def lcm(v1, v2):
        return v1 * v2 // gcd(v1, v2)

    a_lcm = 1
    for a in A:
        d = gcd(a_lcm, a)
        a_lcm = a_lcm * a // d
        if a_lcm > M:
            print(0)
            exit()

    # a_lcm = reduce(lambda v1, v2: lcm(v1, v2), A)

    print((M // a_lcm + 1) // 2)


main()
Buggy python submission (verdict: Time Limit Exceeded):
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
# from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    mod = 1000000007
    N = int(input())
    A = [int(v) for v in input().split()]

    total = 0
    for i, ai in enumerate(A):
        for aj in A[i+1:]:
            total += (ai ^ aj) % mod
    print(total % mod)


main()


Fixed submission:
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
# from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    mod = 1000000007

    N = int(input())
    A = [int(v) for v in input().split()]

    dig = 60

    ans = 0
    for i in range(dig + 1):
        mask = 1 << i
        zero = sum(1 for a in A if a & mask == 0)
        ans += zero * (N - zero) * mask
        ans %= mod

    print(ans % mod)


main()

Buggy python submission (verdict: Time Limit Exceeded):
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
# from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    mod = 1000000007
    N = int(input())
    A = [int(v) for v in input().split()]

    total = 0
    for i, ai in enumerate(A):
        for aj in A[i+1:]:
            total += ai ^ aj
    print(total % mod)


main()


Fixed submission:
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
# from functools import reduce

# a, b = [int(v) for v in input().split()]


def main():
    mod = 1000000007

    N = int(input())
    A = [int(v) for v in input().split()]

    dig = 60

    ans = 0
    for i in range(dig + 1):
        mask = 1 << i
        zero = sum(1 for a in A if a & mask == 0)
        ans += zero * (N - zero) * mask
        ans %= mod

    print(ans % mod)


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

a = N - 3

s = set()
for i in range(0, N - 2):
    s1 = S[i]
    for j in range(i + 1, N - 1):
        s2 = s1 + S[j]
        for k in range(j + 1, N):
            s3 = s2+S[k]
            s.add(s3)

print(len(s))

Fixed submission:
N = int(input())
S = input()

s = set()
sub = set()
for i in range(0, N - 2):
    s1 = S[i]
    if s1 in sub:
        continue
    sub.add(s1)
    for j in range(i + 1, N - 1):
        s2 = s1 + S[j]
        if s2 in sub:
            continue
        sub.add(s2)
        for k in range(j + 1, N):
            s3 = s2+S[k]
            s.add(s3)

print(len(s))
Buggy python submission (verdict: Runtime Error):
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a.sort()
    return a

def eval_ab(a, b):
    if a == 1 or b == 1:
        return a + b - 1
    else:
        return a + b - 2
    
def split(ary, a, b, i):
    e = eval_ab(a, b)

    if len(ary) == i:
        return eval_ab(a, b)
    v = ary[i]

    v1 = split(ary, a * v, b, i+1)
    v2 = split(ary, a, b * v, i+1)
    return min(v1, v2)

def light(ary):
    a = 1
    b = 1
    for v in ary:
        if a < b:
            a *= v
        else:
            b *= v
    return eval_ab(a, b)

ary = prime_factorize(N)
print(ary)

if len(ary) == 1:
    print(str(ary[0] - 1))
elif len(ary) == 2:
    cost = ary[0] + ary[1] - 2
    print(str(cost))
else:
    if N < 100000:
        v1 = split(ary, 1, 1, 0)
        print(v1)
    else:
        v1 = light(ary, 1, 1, 0)
        print(v2)
    #v2 = light(ary)
    #v1 = split(ary, 1, 1, 0)
    #print(v1, v2)
    #print(str(v))



Fixed submission:
import math
N = int(input())

def eval_ab(a, b):
    if a == 1 or b == 1:
        return a + b - 1
    else:
        return a + b - 2
    
min_e = N - 1
a = int(math.sqrt(N)) + 2
for i in range(1, a):

    if N % i == 0:
        j = N // i
        e = eval_ab(i, j)
        min_e = min(e, min_e)

print(min_e)

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

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def split(ary, a, b, i):
    if len(ary) == i:
        if a == 1 or b == 1:
            return a + b - 1
        else:
            return a + b - 2
    v = ary[i]

    v1 = split(ary, a * v, b, i+1)
    v2 = split(ary, a, b * v, i+1)
    return min(v1, v2)

ary = prime_factorize(N)

if len(ary) == 1:
    print(str(ary[0] - 1))
elif len(ary) == 2:
    cost = ary[0] + ary[1] - 2
    print(str(cost))
else:
    v = split(ary, 1, 1, 0)
    print(str(v))

Fixed submission:
import math
N = int(input())

def eval_ab(a, b):
    if a == 1 or b == 1:
        return a + b - 1
    else:
        return a + b - 2
    
min_e = N - 1
a = int(math.sqrt(N)) + 2
for i in range(1, a):

    if N % i == 0:
        j = N // i
        e = eval_ab(i, j)
        min_e = min(e, min_e)

print(min_e)
Buggy python submission (verdict: Runtime Error):
A, B = [int(v) for v in input().split(' ')]

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

def cf(x1, x2):
    array = [1]
    for i in primes(gcd(x1, x2)):
        if x1 % i == 0 and x2 % i == 0:
            array.append(i)
    return array 

def cf_count(x1, x2):
    count = 1
    n = gcd(x1, x2)
    for i in primes(n):
        if x1 % i == 0 and x2 % i == 0:
            count += 1
    return count

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

print(cf_count(A, B))
            


Fixed submission:
A, B = [int(v) for v in input().split(' ')]

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2

    i = 3
    while i * i <= n:
        if n % i == 0:
            a.append(i)
            n //= i
        else:
            i += 2

    if n != 1:
        a.append(n)
    return a

a_fact = prime_factorize(A)
b_fact = prime_factorize(B)

print(len(set(a_fact) & set(b_fact)) + 1)

Buggy python submission (verdict: Runtime Error):
A, B = [int(v) for v in input().split(' ')]

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

def cf(x1, x2):
    array = [1]
    for i in primes(gcd(x1, x2)):
        if x1 % i == 0 and x2 % i == 0:
            array.append(i)
    return array 

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

cf_array = cf(A, B)

print(len(cf_array))
            


Fixed submission:
A, B = [int(v) for v in input().split(' ')]

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2

    i = 3
    while i * i <= n:
        if n % i == 0:
            a.append(i)
            n //= i
        else:
            i += 2

    if n != 1:
        a.append(n)
    return a

a_fact = prime_factorize(A)
b_fact = prime_factorize(B)

print(len(set(a_fact) & set(b_fact)) + 1)
Buggy python submission (verdict: Runtime Error):
import heapq

N, M = [int(v) for v in input().split(' ')]

class Key:
    def __init__(self, cost, C):
        self.cost = cost
        self.C = C

key_array = []
for m in range(0, M):
    a, b = [int(v) for v in input().split(' ')]
    C = [int(v) - 1 for v in input().split(' ')]

    key_array.append(Key(a, C))


cost_heap = []

def search(box, choice, index, cost):
    if len(choice) == index:
        return

    key = key_array[index]

    choice[index] = 0
    next_index = index + 1
    search(box[:], choice, next_index, cost)

    for o in key.C:
        box[o] = True

    if all_open(box):
        enabled_cost = cost + key.cost
        heapq.heappush(cost_heap, enabled_cost)
        return

    choice[index] = 1
    search(box, choice, next_index, cost + key.cost)

def all_open(box):
    for b in box:
        if b == False:
            return False
    return True

box = [False] * N
choice = [0] * M 

search(box, choice, 0, 0)

if len(cost_heap) == 0:
    print(-1)
    exit()

print(heapq.heappop(cost_heap))

Fixed submission:
N, M = [int(v) for v in input().split(' ')]

a_array = []
b_array = []
c_array = []


for i in range(M):
    a, b = [int(v) for v in input().split(' ')]
    bit = 0
    for c in input().split(' '):
        bit |= 1 << (int(c) - 1)

    a_array.append(a)
    b_array.append(b)
    c_array.append(bit)

key = 0
for c in range(N):
    key |= (1 << c)

dp = [-1 for i in range(key+1)]
dp[0] = 0

for item in range(0, M):
    now = c_array[item]

    for bits in range(0, 1 << N):
        cost1 = dp[bits]
        if cost1 < 0:
            continue

        cost1 += a_array[item]
        cost = dp[bits | now]
        if cost < 0 or cost > cost1:
            dp[bits | now] = cost1
    
print(dp[key])
Buggy python submission (verdict: Runtime Error):
N = int(input())
print(N ＊＊ 3)


Fixed submission:
N = int(input())
print(N ** 3)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

sum = 0
for i in range(1, N):
    sum += i

print(sum)

Fixed submission:
N = int(input())

sum = (N - 1) * N // 2

print(sum)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(v) for v in input().split(' ')]

sum =0
for v in a:
  sum+=1/v

print("%f" % 1/sum)


Fixed submission:
N = int(input())
A = [int(v) for v in input().split(' ')]

s = 0
for a in A:
    s += 1 / a

print("%.5f" % (1/s))
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = [int(v) for v in input().split()]

class Node:
    def __init__(self):
        self.list = []
        self.score = 0

    def add(self, node):
        self.list.append(node)

nodes = []
for i in range(0, N):
    nodes.append(Node())

for i in range(0, N - 1):
    a, b = [int(v) - 1 for v in input().split()]

    nodes[a].add(nodes[b])

for i in range(0, Q):
    p, x = [int(v) for v in input().split()]

    nodes[p-1].score += x

l = [nodes[0]]

i = 0
while i < len(l):
    node = l[i]
    i += 1
    for child in node.list:
        child.score += node.score
        l.append(child)

print(' '.join(map(lambda n: str(n.score), nodes)))

Fixed submission:
N, Q = [int(v) for v in input().split()]

class Node:
    def __init__(self):
        self.list = []
        self.score = 0

    def add(self, node):
        self.list.append(node)

nodes = []
score = [0] * N

for i in range(0, N):
    nodes.append([])

for i in range(0, N - 1):
    a, b = [int(v) - 1 for v in input().split()]
    nodes[a].append(b)

for i in range(0, Q):
    p, x = [int(v) for v in input().split()]
    score[p-1] += x

l = [0]

i = 0
while i < len(l):
    node = l[i]
    for child in nodes[node]:
        score[child] += score[l[i]]
        l.append(child)
    i += 1

print(' '.join(map(str, score)))

Buggy python submission (verdict: Runtime Error):
N, Q = [int(v) for v in input().split()]

class Node:
    def __init__(self):
        self.list = []
        self.score = 0

    def add(self, node):
        self.list.append(node)

nodes = []
for i in range(0, N):
    nodes.append(Node())

for i in range(0, N - 1):
    a, b = [int(v) - 1 for v in input().split()]

    nodes[a].add(nodes[b])

for i in range(0, Q):
    p, x = [int(v) for v in input().split()]

    nodes[p-1].score += x

def search(node):
    for child in node.list:
        child.score += node.score
        search(child)

search(nodes[0])

print(' '.join(map(lambda n: str(n.score), nodes)))

Fixed submission:
N, Q = [int(v) for v in input().split()]

class Node:
    def __init__(self):
        self.list = []
        self.score = 0

    def add(self, node):
        self.list.append(node)

nodes = []
score = [0] * N

for i in range(0, N):
    nodes.append([])

for i in range(0, N - 1):
    a, b = [int(v) - 1 for v in input().split()]
    nodes[a].append(b)

for i in range(0, Q):
    p, x = [int(v) for v in input().split()]
    score[p-1] += x

l = [0]

i = 0
while i < len(l):
    node = l[i]
    for child in nodes[node]:
        score[child] += score[l[i]]
        l.append(child)
    i += 1

print(' '.join(map(str, score)))
Buggy python submission (verdict: Runtime Error):
a,b = [ = [int(v) for v in input().split(" ")]

d = a+b
e = a-b
f = a*b
print(max(max(d,e),f))


Fixed submission:
a,b = [int(v) for v in input().split(" ")]

d = a+b
e = a-b
f = a*b
print(max(max(d,e),f))

Buggy python submission (verdict: Runtime Error):
a,b = [ = [int(v) for v in input().split()]

d = a+b
e = a-b
f = a*b
print(max(max(d,e),f))


Fixed submission:
a,b = [int(v) for v in input().split(" ")]

d = a+b
e = a-b
f = a*b
print(max(max(d,e),f))
Buggy python submission (verdict: Runtime Error):
def main():
  n = int(input())
  P = map(int, input().split())

  count = 0
  p1 = P[0]
  p2 = P[1]
  for i in range(2, n):
    p3 = P[i]
    if p1 < p2 < p3 or p1 > p2 > p3:
      count += 1
    p1 = p2
    p2 = p3

main()


Fixed submission:
def main():
    n = int(input())
    P = list(map(int, input().split()))

    count = 0
    p1 = P[0]
    p2 = P[1]
    for i in range(2, n):
        p3 = P[i]
        if p1 < p2 < p3 or p1 > p2 > p3:
            count += 1
        p1 = p2
        p2 = p3

    print(count)


main()
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())

if A >= 13:
    print(B)
elif A >= 6:
    print(B // 2)
else:
    print(0)


Fixed submission:
A, B = map(int, input().split())

if A >= 13:
    print(B)
elif A >= 6:
    print(B // 2)
else:
    print(0)