Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for i in range(N)]

total = int(max(a)/2)
print(max(a))
print(total)
a.remove(max(a))
print(a)
total += sum(a)

Fixed submission:
D=input()
 
if D=='25':
    print('Christmas')
elif D=='24':
    print('Christmas Eve')
elif D=='23':
    print('Christmas Eve Eve')
elif D=='22':
    print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
total = max(a)/2
a.remove(max(a))
total += sum(a)
print(total)

Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]

total = int(max(a)/2)
a.remove(max(a))
total += sum(a)

print(total)
Buggy python submission (verdict: Runtime Error):
input = input().split()

cntYes = 0
for C in range(1,4):
    ans = int(input[0])*int(input[1])*C
    if ans%2!=0:
       cntYes += 1
if cnt>0:
    print('Yes')
else:
    print('No')

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

cntYes = 0
for C in range(1,4):
    ans = int(input[0])*int(input[1])*C
    if ans%2!=0:
       cntYes += 1
if cntYes>0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
l = list(map(int, input().split()))
nl = np.array(l)
X = nl.sum()
a = []
for i in range(N-1):
    x = nl[0:i+1]
    a.append(abs(2 * x.sum() - X))
print(min(a))

Fixed submission:
import numpy as np

N = int(input())
l = list(map(int, input().split()))
nl = np.array(l)
X = nl.sum()
a = []
x = 0
for i in range(N-1):
    x = x + nl[i]
    a.append(abs(2 * x - X))
print(min(a))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
l = list(map(int, input().split()))
nl = np.array(l)
a = []
for i in range(N-1):
    x = nl[0:i+1]
    y = nl[i+1:N]
    a.append(abs(x.sum() - y.sum()))
print(min(a))

Fixed submission:
import numpy as np

N = int(input())
l = list(map(int, input().split()))
nl = np.array(l)
X = nl.sum()
a = []
x = 0
for i in range(N-1):
    x = x + nl[i]
    a.append(abs(2 * x - X))
print(min(a))
Buggy python submission (verdict: Runtime Error):
n = input()

print(n.replace(1, 9).replace(9, 1))



Fixed submission:
n = str(input())
print(n.replace('1', 'a').replace('9', '1').replace('a', '9'))
Buggy python submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = min(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])

Buggy python submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])

Buggy python submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num)
print(int(two_num) + min_num)

Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])

Buggy python submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) + min_num)

Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])

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

max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))

two_num = str(max_num) + str(mid_num[0])
print(two_num + min_num)



Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N % 2 == 0:
  print(N)
else:
  print(2N)

Fixed submission:
N = int(input())
 
if N % 2 == 0:
  print(N)
else:
  print(2 * N)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

add = A + B
sub = A - b
mui = A * B

print(max(add, sub, mui))

Fixed submission:
A, B = map(int, input().split())
 
add = A + B
sub = A - B
mui = A * B
 
print(max(add, sub, mui))

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max(A+B, A=B, A*B))

Fixed submission:
A, B = map(int, input().split())
 
add = A + B
sub = A - B
mui = A * B
 
print(max(add, sub, mui))
Buggy python submission (verdict: Runtime Error):
n1 = list(map(str, input().split()))
n2 = list(map(str, input().split()))
n3 = list(map(str, input().split()))

print(n1[0] + n2[1] + n3[2])

Fixed submission:
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
a = int(input())
b = int(input())

rest_a = x - a
rest_b = 0
while rest_a >= 0:
  rest_b = rest_a - b
print(rest_b)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

rest_a = x - a
rest_b = rest_a % b
print(rest_b)
Buggy python submission (verdict: Runtime Error):
import math

a, b = map(str, input().split())
num = int(a + b)

if math.sqrt(num)is_integer():
  print('Yes')
else:
  print('No')

Fixed submission:
import math
 
a, b = map(str, input().split())
num = int(a + b)
 
if math.sqrt(num).is_integer():
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import math
 
a = float(input())
b = float(input())

mean = (a + b) / 2
print(math.ceil(mean))

Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))

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

a = int(input())
b = int(input())
mean = (a + b) / 2
print(math.ceil(mean))

Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
mean = (a + b) / 2
print(math.ceil(mean))

Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
mean = (a + b) / 2
print(math.ceil(mean))

Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

print(math.ceil((a + b) / 2))


Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))
Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(len(n)):
  if n[i] == 1:
    count += 1
  else:
    count += 0
print(count)

Fixed submission:
n = str(input())
count = 0
for i in range(len(n)):
  if n[i] == '1':
    count += 1
  else:
    count += 0
print(count)

Buggy python submission (verdict: Runtime Error):
s = input()

count = 0

for i in (len(s)):
  if s[i] == '1':
    count = count + 1

print(count)

Fixed submission:
n = str(input())
count = 0
for i in range(len(n)):
  if n[i] == '1':
    count += 1
  else:
    count += 0
print(count)
Buggy python submission (verdict: Runtime Error):
N, A, B = int(input())

if N * A >= B:
  print(B)
else:
  print(N * A)

Fixed submission:
N, A, B = map(int, input().split())
 
if N * A >= B:
  print(B)
else:
  print(N * A)
Buggy python submission (verdict: Runtime Error):
n = input()
 
if ((n[0] == n[1] == n[2] or (n[1] == n[2] == n[3])):
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n = input()
 
if (n[0] == n[1] == n[2] or (n[1] == n[2] == n[3]):
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())
 
if ((n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3])):
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())
 
if ((n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3]) or (n[3] == n[0] and n[0] == [1])):
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())

if (n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3]) or (n[3] == n[0] and n[0] == [1]):
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a = str(input())
b = str(input())
 
rev_a = a[::-1]
 
if rev_a == b:
    print('YES)
else:
    print('NO')

Fixed submission:
a = str(input())
b = str(input())
 
rev_a = a[::-1]
 
if rev_a == b:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
a = str(input())
b = str(input())

rev_a = a[::-1]

if rev_a == b:
  print('YES)
else:
  print('NO')

Fixed submission:
a = str(input())
b = str(input())
 
rev_a = a[::-1]
 
if rev_a == b:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n in '9':
  print("Yes")
else:
  print("No")

Fixed submission:
N = str(input())

if N[0] == '9' or N[1] == '9':
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
s = input()
s_add
for i in range(len(s)):
  if i % 2 == 1:
    s_add = s[i]
print(s)

Fixed submission:
s = input()
s_add = ""
for i in range(len(s)):
  if i % 2 == 0:
    s_add = s_add + s[i]
print(s_add)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
 
before = 0
after = 0
 
if a >= c:
  before = a - c
else:
  before = c - a
 
if b >= d:
  after = d
else:
  after = b
print(after - before)

Fixed submission:
n = input()

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

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 ==0:
  print("Possible")
else:
  print("Impossible")

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

if A % 3 == 0 or B % 3== 0 or (A + B)%3 == 0:
  print('Possible')
else:
  print('Impossible')
Buggy python submission (verdict: Runtime Error):
a, b = int(map, input().split())

h = a + b

if h < 24:
  print(h)
else:
  print(24 - h)

Fixed submission:
a, b = map(int, input().split())
 
h = a + b
 
if h < 24:
  print(h)
else:
  print(h - 24)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

if A > b:
  print('Alice')
elif A < B:
  print('Bob')
else:
  print('Draw')

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

if A == 1:
  A = 14
if B == 1:
  B = 14
 
if A > B:
  print('Alice')
elif A < B:
  print('Bob')
else:
  print('Draw')
Buggy python submission (verdict: Runtime Error):
a = input()
print(a.replace(',', ' ')

Fixed submission:
a = input()
print(a.replace(',', ' '))
Buggy python submission (verdict: Runtime Error):
import collections

def answer(list,n):
    Even = collections.Counter(list[::2]).most_common(2)
    Odd = collections.Counter(list[1::2]).most_common(2)

    if Even[0][0] != Odd[0][0]:
        return n - Even[0][1] - Odd[0][1]
    else:
        if len(Even) == 1 or len(Odd) == 1:
            return n // 2
        else:
            return n - max(Even[0][1]+Odd[1][1],Even[1][1]+Odd[0][1])

N = int(input())
list = input().split(" ")
print(answer(list,N))


Fixed submission:
ans = int(input())
print(1110-ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
num = []

for i in range(N):
    East = S[:i]
    West = S[(i+1):]
    num.append(S[:i].count("W")+S[(i+1)].count("E"))
print(min(num))


Fixed submission:
N = int(input())
S = input()
east = S.count("E")
west = 0
min = east

for i in S:
    if i == "E":
        east -= 1
    else:
        west += 1
    if min > east + west:
        min = east + west

print(min)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
num = []

for i in range(N):
    if i == 0:
        East = []
    else:
        East = S[:i]

    if i == N:
        West = []
    else:
        West = S[(i+1):]
    num.append(East.count("W")+West.count("E"))
print(min(num))


Fixed submission:
N = int(input())
S = input()
east = S.count("E")
west = 0
min = east

for i in S:
    if i == "E":
        east -= 1
    else:
        west += 1
    if min > east + west:
        min = east + west

print(min)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
K = int(input())
dict = []

for i in range(len(s)):
    for k in range(len(s)-i+1):
        if s[i:(k+i)] not in dict:
            dict.append(s[i:(k+i)])
dict.sort()
print(dict[K])


Fixed submission:
s = input()
K = int(input())
dict = []

for i in range(len(s)):
    for k in range(6):
        if s[i:min(i+k,len(s))] not in dict:
            dict.append(s[i:min(i+k,len(s))])
dict.sort()
print(dict[K])
Buggy python submission (verdict: Time Limit Exceeded):
import statistics
import copy
N = int(input())
X = list(map(int,input().split(" ")))
Y = copy.deepcopy(X)
Y.sort()
for i in range(N):
    Z = copy.deepcopy(Y)
    Z.remove(X[i])
    print(Z[N//2-1])


Fixed submission:
import copy
N = int(input())
X = list(map(int,input().split(" ")))
Y = copy.deepcopy(X)
Y.sort()
B = (Y[N//2]+Y[N//2-1])/2

for i in range(N):
    if X[i] <= B:
        print(Y[N//2])
    else:
        print(Y[N//2-1])

Buggy python submission (verdict: Time Limit Exceeded):
import statistics
import copy

N = int(input())
X = list(map(int,input().split(" ")))
for i in range(N):
    Y = copy.deepcopy(X)
    Y[i] = 0
    Y.remove(0)
    print(statistics.median(Y))


Fixed submission:
import copy
N = int(input())
X = list(map(int,input().split(" ")))
Y = copy.deepcopy(X)
Y.sort()
B = (Y[N//2]+Y[N//2-1])/2

for i in range(N):
    if X[i] <= B:
        print(Y[N//2])
    else:
        print(Y[N//2-1])
Buggy python submission (verdict: Time Limit Exceeded):
import collections
N,K = map(int,input().split(" "))
A = list(map(int,input().split(" ")))
count = collections.Counter(A)
if len(count.values()) <= K:
    print(0)
else:
    ans = 0
    for i in range(len(count.values()) - K):
        ans += count.most_common()[-(i+1)][1]
    print(ans)


Fixed submission:
import collections
N,K = map(int,input().split(" "))
A = list(map(int,input().split(" ")))
count = collections.Counter(A)
num = len(count)-K
a = sorted(count.values())
print(sum(a[:num]))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
s = set([a, b, c])
print len(s)

Fixed submission:
a,b,c = map(int, raw_input().split())
s = set([a, b, c])
print len(s)

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
s = set([a, b, c]]
print len(s)

Fixed submission:
a,b,c = map(int, raw_input().split())
s = set([a, b, c])
print len(s)
Buggy python submission (verdict: Runtime Error):
import functools

n = input()
l = input().split()

if n < 3 or 10 < n:
  return 'No'

for _l in l:
	if _l < 1 or 100 < _l:
		return 'No'

longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

if longest > sum:
	return 'Yes'
else
	return 'No'



Fixed submission:
import functools

n = int(input())
l = list(map(lambda x: int(x), input().split()))
    
longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

if longest >= sum:
	print('No')
else:
	print('Yes')
Buggy python submission (verdict: Runtime Error):
a = map(int, input().split())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')

Fixed submission:
a, b = map(int, input().split())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')

Fixed submission:
a, b = map(int, input().split())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int, input())
out = 0

for i in range(0,n+1):
  sum = sum([int(j) for j in str(j)])
  if a <= sum and sum <= b:
    out += i

print(i)

Fixed submission:
n,a,b = map(int, input().split())
out = 0
 
for i in range(0,n+1):
  s = sum([int(j) for j in str(i)])
  if a <= s and s <= b:
    out += i
 
print(out)
Buggy python submission (verdict: Runtime Error):
h,w = map(int, input().split())
m = []
for y in range(h):
  s = input()
  l = []
  for i in s:
    if i == '#':
      l.append(1)
    else:
      l.append(0)

print(m)
for y in range(h):
  s = ''
  for x in range(w):
    bomb = 0
    for i,j in ((-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)):
      if y+j < 0 or x+i < 0 or x+i >= w or y+j >= h:
        continue
      if m[y+j][x+i] == 1:
        bomb += 1
    if m[y][x] == 1:
      bomb = '#'
    s += str(bomb)
  print(s)
    

Fixed submission:
h,w = map(int, input().split())
m = []
for y in range(h):
  s = input()
  l = []
  for i in s:
    if i == '#':
      l.append(1)
    else:
      l.append(0)
  m.append(l)

for y in range(h):
  s = ''
  for x in range(w):
    bomb = 0
    for i,j in ((-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)):
      if y+j < 0 or x+i < 0 or x+i >= w or y+j >= h:
        continue
      if m[y+j][x+i] == 1:
        bomb += 1
    if m[y][x] == 1:
      bomb = '#'
    s += str(bomb)
  print(s)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = []

next_b = 1
count = 0
for _ in range(0,n):
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if next_b in pushed:
    count = -1
    break
  pushed.append(next_b)
  
if count == n:
  count = -1
print(count)
  

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = {}

next_b = 1
count = 0
for _ in range(0,n):
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if pushed.get(next_b) != None:
    count = -1
    break
  pushed[next_b] = True
  
if count == n:
  count = -1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = []

next_b = 1
count = 0
for _ in range(0,n):
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if next_b in pushed:
    count = -1
    break
  pushed.append(next_b)
  
if count == n:
  count = -1
print(count)
  

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = {}

next_b = 1
count = 0
for _ in range(0,n):
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if pushed.get(next_b) != None:
    count = -1
    break
  pushed[next_b] = True
  
if count == n:
  count = -1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = []

next_b = 1
count = 0
while True:
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if next_b in pushed:
    count = -1
    break
  pushed.append(next_b)
  
print(count)
  

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
n = ni()
a = [int(ns()) for i in range(n)]
pushed = {}

next_b = 1
count = 0
for _ in range(0,n):
  if next_b == 2:
    break
  count += 1
  next_b = a[next_b-1]
  if pushed.get(next_b) != None:
    count = -1
    break
  pushed[next_b] = True
  
if count == n:
  count = -1
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a = [int(i) for i in a]

candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in (1 , 2n+1, 2)]))

Fixed submission:
n = int(input())
a = input().split()
a = [int(i) for i in a]
a = sorted(a)
 
candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in range(0, 2*n, 2)]))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
k, s = na()

count = 0
for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
      if x + y + z == s:
        count += 1
print(count)

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
k, s = na()

count = 0
for x in range(k+1):
  for y in range(k+1):
      if s-x-y >= 0 and s-x-y <= k:
        count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
k, s = na()

count = 0
for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
      if x + y + z == s:
        count += 1
print(count)

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
 
k, s = na()

count = 0
for x in range(k+1):
  for y in range(k+1):
      if s-x-y >= 0 and s-x-y <= k:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
N = input()
T, A = map(int, input().split())
H = list(map(int, input().split()))

for i in range(N)
    H[i] = abs(A - (T - H[i] * 0.006))
print(H.index(min(H)) + 1)

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

for i in range(N):
    H[i] = abs(A - (T - H[i] * 0.006))
print(H.index(min(H)) + 1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
answer = "No"

for x in range(N/4+1):
	for y in range(N/7+1):
  		if(4*x + 7*y == N):
    		answer = "Yes"
      		break
   

Fixed submission:
N = int(input())
answer = "No"
cake = N//4
nut = N//7

for x in range(cake+1):
  for y in range(nut+1):
    if 4*x + 7*y == N:
      answer = "Yes"

print(answer)

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

for x in range(N/4)
	for y in range(N/7)
  		if(4*x + 7*y ==)
    		print("Yes")
      		break
   

Fixed submission:
N = int(input())
answer = "No"
cake = N//4
nut = N//7

for x in range(cake+1):
  for y in range(nut+1):
    if 4*x + 7*y == N:
      answer = "Yes"

print(answer)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split)

if a+b >= c:
	print('Yes')
else:
	print('No')

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

if a+b >= c:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

if N > M:
	N,M = M,N

if N == 1:
	if M == 1:
		print(1)
	else:
		print(M-2)
else:
	print(M-2)*(N-2)


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

if N > M:
	N,M = M,N

if N == 1:
	if M == 1:
		print(1)
	else:
		print(M-2)
else:
	print((M-2)*(N-2))