Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int, input().split()))

q = []
summation = [p[i] + p[i + 1] for i in range(N - 1)]
for i in range(int(N / 2)):
    if len(p) == 2:
        q = p + q
    else:
        index = summation.index(max(summation))
        q = p[index:index + 2] + q
        p = p[:index] + p[index + 2:]
        if index == 0:
            summation = summation[2:]
        elif index == len(summation):
            summation = summation[:index - 1]
        else:
            summation = summation[:index - 1] + [p[index - 1] + p[index]] + summation[index + 2:]

[print(i, end=' ') for i in q]


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

count1 = 0
count2 = 0
count4 = 0
for i in range(N):
    value = a[i] % 4
    if value == 0:
        count4 += 1
    elif value == 2:
        count2 += 1
    else:
        count1 += 1

if count1 <= count4 or (count1 - count4 == 1 and count2 == 0):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int, input().split()))

q = []
summation = [p[i] + p[i + 1] for i in range(N - 1)]
for i in range(int(N / 2)):
    if len(p) == 2:
        q = p + q
    else:
        index = summation.index(max(summation))
        q = p[index:index + 2] + q
        p = p[:index] + p[index + 2:]
        print(index, summation)
        if index == 0:
            summation = summation[2:]
        elif index == len(summation):
            summation = summation[:index - 1]
        else:
            summation = summation[:index - 1] + [p[index - 1] + p[index]] + summation[index + 2:]

[print(i, end=' ') for i in q]

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

count1 = 0
count2 = 0
count4 = 0
for i in range(N):
    value = a[i] % 4
    if value == 0:
        count4 += 1
    elif value == 2:
        count2 += 1
    else:
        count1 += 1

if count1 <= count4 or (count1 - count4 == 1 and count2 == 0):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, raw_input().split())
a = []
b = []
for i in range(M):
    temp = map(int, raw_input().split())
    if 1 == temp[0]:
        a.append(temp[1])
    elif N in temp:
        b.append(temp[0])

flag = False
for x in a:
    if x in b:
        print('POSSIBLE')
        flag = True
        break
if not flag:
    print('IMPOSSIBLE')

Fixed submission:
N, M = map(int, raw_input().split())
a = []
b = []
for i in range(M):
    temp = map(int, raw_input().split())
    if 1 == temp[0]:
        a.append(temp[1])
    elif N == temp[1]:
        b.append(temp[0])

if any(list(set(a) & set(b))):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, raw_input().split())
a = []
b = []
for i in range(M):
    temp = map(int, raw_input().split())
    if 1 in temp or N in temp:
        a.append(min(temp))
        b.append(max(temp))

M = len(a)

flag = False

index_1 = [i for i, x in enumerate(a) if x == 1]

for i in index_1:
    for j in range(M):
        if i != j and b[i] == a[j] and N == b[j]:
            print('POSSIBLE')
            flag = True
            break
if not flag:
    print('IMPOSSIBLE')

Fixed submission:
N, M = map(int, raw_input().split())
a = []
b = []
for i in range(M):
    temp = map(int, raw_input().split())
    if 1 == temp[0]:
        a.append(temp[1])
    elif N == temp[1]:
        b.append(temp[0])

if any(list(set(a) & set(b))):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, raw_input().split())
a = [map(int, raw_input().split()) for _ in range(M)]

flag = False

for i in range(M):
    if a[i][0] == 1:
        for j in range(M):
            if i != j and a[i][1] in a[j] and N in a[j]:
                print('POSSIBLE')
                flag = True
                break
    elif a[i][1] == 1:
        for j in range(M):
            if i != j and a[i][0] in a[j] and N in a[j]:
                print('POSSIBLE')
                flag = True
                break
if not flag:
    print('IMPOSSIBLE')

Fixed submission:
N, M = map(int, raw_input().split())
a = []
b = []
for i in range(M):
    temp = map(int, raw_input().split())
    if 1 == temp[0]:
        a.append(temp[1])
    elif N == temp[1]:
        b.append(temp[0])

if any(list(set(a) & set(b))):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(raw_input())
a = map(int, raw_input().split())

diff = [abs(sum(a[select:])-sum(a[:select])) for select in range(1,N)]
print min(diff)

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

sum1 = a[0]
sum2 = sum(a[1:])
diff = [abs(sum1-sum2)]
for i in range(1,N-1):
  sum1 += a[i]
  sum2 -= a[i]
  diff.append(abs(sum1-sum2))

# diff = [abs(sum(a[select:])-sum(a[:select])) for select in range(1,N)]
print min(diff)
Buggy python submission (verdict: Runtime Error):
 = list(map(str, raw_input().split())[0])
S.sort()

flag = True
for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        flag = False
        break

if flag:
    print("yes")
else:
    print("no")

Fixed submission:
S = list(map(str, raw_input().split())[0])
S.sort()

flag = True
for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        flag = False
        break

if flag:
    print("yes")
else:
    print("no")
Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

flag = True
for i in range(len(s)):
    if (s[i] % 10) != 0:
        flag = False
        break
if flag:
    print(0)
else:
    s.sort()
    s = s[::-1]
    Ncombination = 2**len(s)

    for c in range(Ncombination):
        SUM = 0
        combination = format(c, 'b').zfill(len(s))
        # print("combination", combination)
        for i in range(len(s)):
            # print("combination", i, combination[i])
            if combination[i] == "0":
                SUM += s[i]
        # print("SUM", SUM)
        if (SUM % 10) != 0:
            break
    print(SUM)

Fixed submission:
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

result = sum(s)
if (result % 10) != 0:
    print(result)
else:
    s.sort()
    for i in range(len(s)):
        if (s[i] % 10) != 0:
            result -= s[i]
            break
    if (result % 10) != 0:
        print(result)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

flag = True
for i in range(len(s)):
    if (s[i] % 10) != 0:
        flag = False
        break
if flag:
    print(0)
else:
    s.sort()
    s = s[::-1]
    Ncombination = 2**len(s)

    for c in range(Ncombination):
        SUM = 0
        combination = format(c, 'b').zfill(len(s))
        # print("combination", combination)
        for i in range(len(s)):
            # print("combination", i, combination[i])
            if combination[i] == "0":
                SUM += s[i]
        # print("SUM", SUM)
        if (SUM % 10) != 0:
            break
    print(SUM)
~                

Fixed submission:
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

result = sum(s)
if (result % 10) != 0:
    print(result)
else:
    s.sort()
    for i in range(len(s)):
        if (s[i] % 10) != 0:
            result -= s[i]
            break
    if (result % 10) != 0:
        print(result)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

flag = True
for i in range(len(s)):
    if (s[i] % 10) != 0:
        flag = False
        break
if flag:
    print(0)
else:
    s.sort()
    s = s[::-1]
    Ncombination = 2**len(s)

    for c in range(Ncombination):
        SUM = 0
        combination = format(c, 'b').zfill(len(s))
        # print("combination", combination)
        for i in range(len(s)):
            print("combination", i, combination[i])
            if combination[i] == "0":
                SUM += s[i]
        # print("SUM", SUM)
        if (SUM % 10) != 0:
            break
    print(SUM)

Fixed submission:
N = int(raw_input())
s = [int(raw_input()) for _ in range(N)]

result = sum(s)
if (result % 10) != 0:
    print(result)
else:
    s.sort()
    for i in range(len(s)):
        if (s[i] % 10) != 0:
            result -= s[i]
            break
    if (result % 10) != 0:
        print(result)
    else:
        print(0)
Buggy python submission (verdict: Runtime Error):
import itertools
 
N, A, B = map(int, raw_input().split())
 
v = map(int, raw_input().split())
 
resultValue = 0
resultCount = 0
 
for pcs in range(B - A + 1):
    perm = list(itertools.combinations(v, B + pcs))
    for cand in perm:
        average = float(sum(cand)) / len(cand)
        if resultValue < average:
            resultValue = average
            resultCount = 1
        elif resultValue == average:
            resultCount += 1
 
print(resultValue)
print(resultCount)


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

result = A + B

while True:
    if 24 <= result:
        result -= 24
    else:
        break

print(result)

Buggy python submission (verdict: Runtime Error):
A, B = map(int, raw_input().split())

result = A + B

while True:
    if 24 <= result:
        result -= 24
    else:
        break

print(result)

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

result = A + B

while True:
    if 24 <= result:
        result -= 24
    else:
        break

print(result)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
if a == b:
    print 'H'
else:
    print 'D'

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

if a == b:
    print 'H'
else:
    print 'D'
Buggy python submission (verdict: Runtime Error):
from sklearn.datasets import load_digits
input, ground_truth = load_digits(return_X_y=True)
 
l = input().split()
 
a = int(l[0],16)
b = int(l[1],16)
 
if a == b:
	print("=")
elif a < b:
	print("<")
else:
	print(">")

Fixed submission:
l = input().split()

a = int(l[0],16)
b = int(l[1],16)

if a == b:
	print("=")
elif a < b:
	print("<")
else:
	print(">")

Buggy python submission (verdict: Runtime Error):
from sklearn.datasets import load_digits
input, ground_truth = load_digits(return_X_y=True)

l = input().split()
 
a = int(l[0],16)
b = int(l[1],16)
 
if a == b:
	print("=")
elif a < b:
	print("<")
else:
	print(">")

Fixed submission:
l = input().split()

a = int(l[0],16)
b = int(l[1],16)

if a == b:
	print("=")
elif a < b:
	print("<")
else:
	print(">")
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
m = int(raw_input())
print( n*n - m )

Fixed submission:
n = int(input())
m = int(input())
print( n*n - m )
Buggy python submission (verdict: Runtime Error):
n = int(input())
k = int(input())
l = []
for i in range(n):
 l.append(int(input()))
ans = 0
for i in l:
 if( i < abs( i - k )  ):
  ans += 2*abs(i-k)
 else:
  ans += 2*i
print(ans)


Fixed submission:
n = int(input())
k = int(input())
l = input().split()
ans = 0
for i in l:
  j = int(i)
  if( j < abs( j - k )  ):
    ans += 2*j
  else:
    ans += 2*abs(j-k)
print(ans)
Buggy python submission (verdict: Runtime Error):
x = int(input())
t = int(input())

if t < x:
  print( x - t )
else:
  print( 0 )

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


if t < x:
  print( x - t )
else:
  print( 0 )

Buggy python submission (verdict: Runtime Error):
x = input()
t = input()

if t < x:
  print( x - t )
else:
  print( 0 )

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


if t < x:
  print( x - t )
else:
  print( 0 )
Buggy python submission (verdict: Time Limit Exceeded):
import math
n,l =  input() , [ q-p for p,q in enumerate([ i for i,j in enumerate( map( int , input().split())) if i+1 == j ] ) ]
print( sum( [ math.ceil(l.count(j)/2) for i,j in enumerate(l) if i==0  or l[i]!=l[i-1]]))

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

#入れ替える必要のある要素のインデントを格納
l = []
for i,item in enumerate(m):
  if i+1 == item:
    l.append(i)

ans = len(l)

for i in range(len(l)):
  if i == 0:
    continue

  if l[i] == l[i-1] + 1:
    ans -= 1
    l[i] = l[i-1] - 1


print(ans)
Buggy python submission (verdict: Runtime Error):
string = input()
index_of_A = string.index("A")
index_of_Z = string.index("Z", index_of_A, len(string)-1)

print(index_of_Z - index_of_A + 1)

Fixed submission:
string = input()
index_of_A = string.index("A")
index_of_Z = string.rfind("Z")

print(index_of_Z - index_of_A + 1)

Buggy python submission (verdict: Runtime Error):
string = input()
count = 0
for i in range(len(string)):
  if string[i] == "A":
    count = 1
    while string[i] != "Z":
      count += 1
      i += 1 
print(count+1)

Fixed submission:
string = input()
index_of_A = string.index("A")
index_of_Z = string.rfind("Z")

print(index_of_Z - index_of_A + 1)
Buggy python submission (verdict: Runtime Error):
num_problems = int(input())
a = input()
seconds_per = a.split()
for i in seconds_per:
  total += int(i)
drinks = int(input())
for i in range(drinks):
  b = input()
  c = b.split()
  question = int(c[0])
  change = int(c[1])
  new = total-int(seconds_per[question-1]) + change
  print(new)


  

Fixed submission:
num_problems = input()
a = input()
total = 0
seconds_per = a.split()
for i in seconds_per:
  total += int(i)
drinks = int(input())
for i in range(drinks):
  b = input()
  c = b.split()
  question = int(c[0])
  change = int(c[1])
  new = total-int(seconds_per[question-1]) + change
  print(new)

Buggy python submission (verdict: Runtime Error):
num_problems = int(input())
a = input()
seconds_per = a.split()
drinks = int(input())
for i in range(drinks):
  b = input()
  c = b.split()
  question = int(c[0])
  change = int(c[1])
  copy = seconds_per[question-1]
  seconds_per[question-1] = change
  print(sum(seconds_per))
  seconds_per[question-1] = copy


  

Fixed submission:
num_problems = input()
a = input()
total = 0
seconds_per = a.split()
for i in seconds_per:
  total += int(i)
drinks = int(input())
for i in range(drinks):
  b = input()
  c = b.split()
  question = int(c[0])
  change = int(c[1])
  new = total-int(seconds_per[question-1]) + change
  print(new)
Buggy python submission (verdict: Runtime Error):
letter = input()
if(letter == "a" or letter == "e" or letter = "i" or letter == "o" or letter == "u"):
  print("vowel")
else:
  print("consonant")

Fixed submission:
letter = input()
if letter in "aeiou":
  print("vowel")
else:
  print("consonant")
Buggy python submission (verdict: Runtime Error):
j = int(input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))


Fixed submission:
j = (input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = [a, b, c]
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))


Fixed submission:
j = (input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
s = {}
s.add(a)
s.add(b)
s.add(c)
print len(s)


Fixed submission:
j = (input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))

Buggy python submission (verdict: Runtime Error):

a = int(input())
b = int(input())
c = int(input())
s = {a, b, c}
print len(s)

Fixed submission:
j = (input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))
Buggy python submission (verdict: Runtime Error):
i = input()
j = i.split()
num_balls = j[0]
num_colors = j[1]
product = num_colors
if(num_balls > 1 and num_colors == 1):
  print(0)
for i in range(1, num_balls):
  product *= (num_balls - 1)
print(product)

Fixed submission:
i = input()
j = i.split()
num_balls = int(j[0])
num_colors = int(j[1])
product = num_colors
if(num_balls > 1 and num_colors == 1):
  print(0)
else:
  for i in range(1, num_balls):
    product *= (num_colors - 1)
  print(product)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
area = 0.5(a+b)*h
print(area)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
area = 0.5*(a+b)*h
print(int(area))
Buggy python submission (verdict: Runtime Error):
alice = list(input())
bob = list(input())
charlie = list(input())

current = alice
while(len(alice) > 0 and len(bob) > 0 and len(charlie) > 0):
  if(current[0] == 'a'):
	del current[0]
    current = alice
  elif(current[0] == 'b'):
    del current[0]
	currrent = bob
  elif(current[0] == 'c'):
    del current[0]
	current = charlie
if(len(alice) == 0):
  print('A')
elif(len(bob) == 0):
  print('B')
elif(len(charlie) == 0):
  print('C')

Fixed submission:
alice = list(input())#aca
bob = list(input())#accc
charlie = list(input())#ca

current = alice
while(len(alice) >= 0 and len(bob) >= 0 and len(charlie) >= 0):
  # if(len(current) == 0):
  #   if(current is alice):
  #     print('A')
  #     break
  #   elif(current is bob):
  #     print('B')
  #     break
  #   elif(current is charlie):
  #     print('C')
  #     break
  if(current[0] == 'a'):
    del current[0]
    current = alice
    if(len(current) == 0):
      print('A')
      break
  elif(current[0] == 'b'):
    del current[0]
    current = bob
    if(len(current) == 0):
      print('B')
      break
  elif(current[0] == 'c'):
    del current[0]
    current = charlie
    if(len(current) == 0):
      print('C')
      break
Buggy python submission (verdict: Runtime Error):
import itertools

N, Y = (int(x) for x in input().split())
for x, y in itertools.product(range(N+1), range(N+1)):
  z = N - x - y
  if 0 <= z and 10000*x + 5000*y + 1000*z == Y:
    print('{} {} {}'.format(x, y, z))
    break
if not(x + y + z == N and 10000*x + 5000*y + 1000*z == Y):      
  print('-1 -1 -1')

Fixed submission:
S = input()
print('2018'+S[4:])

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

N, Y = (int(x) for x in input().split())
for x, y in itertools.product(range(N+1), range(N+1)):
  z = N - x - y
  if 0 <= z and 10000*x + 5000*y + 1000*z == Y:
    print('{} {} {}'.format(x, y, z))
    break

if not(x + y + z == N and 10000*x + 5000*y + 1000*z == Y):      
  print('-1 -1 -1')

Fixed submission:
S = input()
print('2018'+S[4:])

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

N, Y = (int(x) for x in input().split())
for x, y in itertools.product(range(N+1), range(N+1)):
  z == N - x - y
  if 0 <= z and 10000*x + 5000*y + 1000*z == Y:
    print('{} {} {}'.format(x, y, z))
    break

if not(x + y + z == N and 10000*x + 5000*y + 1000*z == Y):      
  print('-1 -1 -1')

Fixed submission:
S = input()
print('2018'+S[4:])
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N, Y = (int(x) for x in input().split())
for x, y, z in itertools.product(range(N+1), range(N+1), range(N+1)):
    if x + y + z == N and 10000*x + 5000*y + 1000*z == Y:
        print('{} {} {}'.format(x, y, z))
        break
if not(x + y + z == N and 10000*x + 5000*y + 1000*z == Y):      
  print('-1 -1 -1')

Fixed submission:
import itertools

N, Y = (int(x) for x in input().split())
for x, y in itertools.product(range(N+1), range(N+1)):
  z = N - x - y
  if 0 <= z and 10000*x + 5000*y + 1000*z == Y:
    print('{} {} {}'.format(x, y, z))
    break
if not(x + y + z == N and 10000*x + 5000*y + 1000*z == Y):      
  print('-1 -1 -1')
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

k, s = (int(x) for x in input().split())
sum_ = 0
for x, y, z in itertools.product(range(k+1), range(k+1), range(k+1)):
    if x + y + z == s:
        sum_ += 1
print(sum_)


Fixed submission:
k, s = (int(x) for x in input().split())
sum_ = 0
for x in range(k+1):
  for y in range(k+1):
    if 0 <= s-x-y <= k:
        sum_ += 1
print(sum_)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = (int(x) for x in input().split())
sum_ = 0
for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
      if x + y + z == s:
        sum_ += 1
print(sum_)


Fixed submission:
k, s = (int(x) for x in input().split())
sum_ = 0
for x in range(k+1):
  for y in range(k+1):
    if 0 <= s-x-y <= k:
        sum_ += 1
print(sum_)
Buggy python submission (verdict: Runtime Error):

a = int(input())
ans = 2 * a // math.gcd(2, a)
print(ans)


Fixed submission:
a = int(input())

if a % 2 == 0:
    print(a)
else:
    print(2*a)

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

a = int(input())

print(2 * a // math.gcd(2, a))

Fixed submission:
a = int(input())

if a % 2 == 0:
    print(a)
else:
    print(2*a)

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

a = list(map(int, input().split()))
a.append(2)
ans = a[0]
N = len(a)
for i in range(1, N):
    ans = ans * a[i] // math.gcd(ans, a[i])
print(ans)

Fixed submission:
a = int(input())

if a % 2 == 0:
    print(a)
else:
    print(2*a)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))


num_list = []

cnt = 0

while True:
    even_count = 0
    #print(A)

    if not "even" in list(map(lambda x: "even" if x % 2 == 0 else "odd", A)):
        break

    for index, num in enumerate(A):
        if not even_count == 1 and num % 2 == 0:
            num = num//2
            even_count += 1
            A[index] = num

        else:
            num = num * 3
            A[index] = num

    cnt += 1

print(cnt)

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



cnt = 0

for num in range(N):
    while A[num] % 2 ==0:
        cnt += 1
        A[num] //= 2
        
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N, K = map(int, input().split())
candidate = list(range(N+1))
comb = list(itertools.product(candidate, repeat=3))
l = [c for c in comb if sum(c) == K]

print(len(l))

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

cnt = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0 <= z and z <= k:
            cnt += 1

print(cnt)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input()  .split())
candidate = list(range(N+1))
comb = list(itertools.product(candidate, repeat=3))
l = [c for c in comb if sum(c) == K]

print(len(l))

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

cnt = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0 <= z and z <= k:
            cnt += 1

print(cnt)

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

N, K = map(int, input()  .split())
candidate = list(range(N+1))
comb = list(itertools.product(candidate, repeat=3))
i = 0
for c in comb:
    if sum(c) == K:
        i += 1

print(i)

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

cnt = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0 <= z and z <= k:
            cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
a = int(input())
items = input().split(" ")
nums = []
for i in range(a):
  nums.append(int(items[i]))
max_num = max(nums)
min_num = min(nums)
print(max_num - min_num)

Fixed submission:
a = int(input())

if a % 2 == 0:
  print(a)
else:
  print(a * 2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = [map(int,input().split())]
print(max(A) - min(A))


Fixed submission:
n = int(input())
A = list(map(int,input().split()))
print(max(A) - min(A))

Buggy python submission (verdict: Runtime Error):
n = int(input())
A = [map(int,input().split())]
print(max.A - min.A)

Fixed submission:
n = int(input())
A = list(map(int,input().split()))
print(max(A) - min(A))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()

ans = 0
for i in range(N):
    ans = max(ans,len(set(s[:i])) & set(s[i:]))
print(ans)

Fixed submission:
a,b = map(int,input().split())
c = [a + b,a - b,a * b]
print(max(c))