Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys
X, N = map(int, input().split())
if (N==0):
    print(100)
    sys.exit()
p = list(map(int, input()))

n_ans = 1
sa = 100
for k in range(1,100,1):
    if (k in p):
        continue
    if(abs(k-X) < sa):
        n_ans = k
        sa = abs(k-X)
    else:
        break
print(n_ans)

Fixed submission:
import sys
X, N = map(int, input().split())
if (N==0):
    print(X)
    sys.exit()
p = list(map(int, input().split()))

n_ans = 0
sa = 200
for k in range(0,102,1):
    if (k in p):
        continue
    if(abs(k-X) < sa):
        n_ans = k
        sa = abs(k-X)
    else:
        break
print(n_ans)
Buggy python submission (verdict: Runtime Error):
if(V < W):
    print("NO")
elif(abs(A-B)>T*(V-W)):
    print("NO")
else:
    print("YES")

Fixed submission:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if(V<W):
    print("NO")
elif(abs(A-B)>T*(V-W)):
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
import sys
import itertools

num = int(input())
S = []
for _ in range(num):
    S.append(input())

result = False
for i in itertools.permutations(S):
    checkedArray = list(''.join(i))
    if checkedArray[0] == ")": continue

    cost = 0
    for index, item in enumerate(checkedArray):
        if item == "(": cost += 1
        else: cost -= 1

        if cost < 0: break
        if cost == 0 and index == len(checkedArray) - 1:
            result = True
            break

    if result == True: break

print("Yes" if result == True else "No")

Fixed submission:
oldID = input()
newID = input()

print("Yes" if oldID + newID[-1] == newID else "No")

Buggy python submission (verdict: Runtime Error):
oneCard, zeroCard, miniusOneCard, getCardNum = map(int, input().split())

if oneCard >= getCardNum: print(oneCard)
elif oneCard + zeroCard >= getCardNum: print(oneCard)
else: print(oneCard - (getCardNum - oneCard - zeroCard))

Fixed submission:
oldID = input()
newID = input()

print("Yes" if oldID + newID[-1] == newID else "No")
Buggy python submission (verdict: Runtime Error):
if oneCard >= getCardNum: print(oneCard)
elif oneCard + zeroCard >= getCardNum: print(oneCard)
else: print(oneCard - (getCardNum - oneCard - zeroCard))

Fixed submission:
oneCard, zeroCard, miniusOneCard, getCardNum = map(int, input().split())

if oneCard >= getCardNum: print(getCardNum)
elif oneCard + zeroCard >= getCardNum: print(oneCard)
else: print(oneCard - (getCardNum - oneCard - zeroCard))
Buggy python submission (verdict: Runtime Error):

numArray = list(map(int, input().split()))

if numArray.count(5) == 2 && numArray.count(7) == 1: print("YES")
else: print("NO")

Fixed submission:

numArray = list(map(int, input().split()))

if numArray.count(5) == 2 and numArray.count(7) == 1: print("YES")
else: print("NO")
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
li = [[] for i in range(m)]
for i in range(m):
    a, b = map(int,input().split())
    li[a-1].append(b-1)
    li[b-1].append(a-1)
sign = {0: 0}
step = {0: 0}
now = {0}

while len(now) > 0:
    next = set()
    for i in now:
        for j in li[i]:
            if not j in sign:
                sign[j] = i
                step[j] = step[i] + 1
                next.add(j)
    now.clear()
    now = next

print('Yes')
for i in range(n - 1):
    print(sign[i + 1] + 1)

Fixed submission:
n, m = map(int,input().split())
li = [[] for i in range(n)]
for i in range(m):
    a, b = map(int,input().split())
    li[a-1].append(b-1)
    li[b-1].append(a-1)
sign = {0: 0}
step = {0: 1}
now = {0}
flg = False
while len(now) > 0:
    if flg:
        print('No')
        exit()
    flg = True
    next = set()
    for i in now:
        for j in li[i]:
            if not j in sign:
                sign[j] = i
                step[j] = step[i] + 1
                next.add(j)
                flg = False
    now.clear()
    now = next

print('Yes')
for i in range(n - 1):
    print(sign[i + 1] + 1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
li = list(map(int,input().split()))

cnt = 0
for i in range(len(li) - 1):
    for j in range(i + 1, len(li)):
        if j - i == li[i] + li[j]:
            cnt += 1
print(cnt)

Fixed submission:
n = int(input())
li = list(map(int,input().split()))
li2 = [0] * n
li3 = [0] * n
cnt = 0
for i in range(len(li)):
    if i + li[i] < len(li):
        li2[i + li[i]] += 1
    if i - li[i] >= 0:
        li3[i - li[i]] += 1

for i in range(len(li)):
    if li2[i] > 0 and li3[i] > 0:
        cnt += li2[i] * li3[i]

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
nl = {}
cal = {}
kal = {}
cl = {}
for num in l:
  if num in nl:
    nl[num] = nl[num] + 1
  else:
    nl[num] = 1
for n in nl:
  if nl[n] > 1:
    cal[n] = nl[n] * (nl[n]-1) / 2
  else:
    cal[n] = 0
  if nl[n]-1 > 1:
    kal[n] = (nl[n]-1) * (nl[n]-2) / 2
  else:
    kal[n] = 0
for n in nl:
  cnt = 0
  for m in nl:
    if n == m:
      cnt += kal[m]
    else:
      cnt += cal[m]
  cl[n] = int(cnt)
for i in l:
  print(cl[i])

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
nl = {}
cal = {}
kal = {}
cl = {}
all = 0
for num in l:
  if num in nl:
    nl[num] = nl[num] + 1
  else:
    nl[num] = 1
for n in nl:
  if nl[n] > 1:
    cal[n] = nl[n] * (nl[n]-1) / 2
  else:
    cal[n] = 0
  if nl[n]-1 > 1:
    kal[n] = (nl[n]-1) * (nl[n]-2) / 2
  else:
    kal[n] = 0
  all += cal[n]
for n in nl:
  cl[n] = int(all - cal[n] + kal[n])
for i in l:
  print(cl[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
nl = {}
cl = {}
for num in l:
  if num in nl:
    nl[num] = nl[num] + 1
  else:
    nl[num] = 1
for n in nl:
  cnt = 0
  for m in nl:
    if n == m:
      if nl[m]-1 > 1:
        cnt += (nl[m]-1) * (nl[m]-2) / 2
    else:
      if nl[m] > 1:
        cnt += nl[m] * (nl[m]-1) / 2
  cl[n] = int(cnt)
for i in l:
  print(cl[i])

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
nl = {}
cal = {}
kal = {}
cl = {}
all = 0
for num in l:
  if num in nl:
    nl[num] = nl[num] + 1
  else:
    nl[num] = 1
for n in nl:
  if nl[n] > 1:
    cal[n] = nl[n] * (nl[n]-1) / 2
  else:
    cal[n] = 0
  if nl[n]-1 > 1:
    kal[n] = (nl[n]-1) * (nl[n]-2) / 2
  else:
    kal[n] = 0
  all += cal[n]
for n in nl:
  cl[n] = int(all - cal[n] + kal[n])
for i in l:
  print(cl[i])
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b && a != c:
  print('Yes')
elif a == c && a != b:
  print('Yes')
elif b == c && a != c:
  print('Yes')
else:
  print('No')

Fixed submission:
a, b, c = map(int, input().split())
if a == b and a != c:
  print('Yes')
elif a == c and a != b:
  print('Yes')
elif b == c and a != c:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N,M =map(int,input().split())
a = list(map(int, input().split())) 
a.sort(reverse = True)

m = 4*M
c = 0 
for i  in range(0,M):
  if a[i] >=m:
    c +=1
   
  
  
if c = M:
  print('Yes')
else:
  print('No')

Fixed submission:
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.sort(reverse = True)
k = s/(4*m)
if a[m-1] < k:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
S =input()
S =int(S)
a = 0
b =0

while S>=500:
  S -=500
  a +=1
  g =S-(500*a)
  while g>=5:
    g -=5
    b +=1
h =1000*a +5*b
print(h)

Fixed submission:
a = input()
a = list(a)
if a[2] == a[3] and a[4] ==a[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
from decimal import *

getcontext().prec = 1000000000
a,b,c =map(int,input().split())
d=math.sqrt(a)
e=math.sqrt(b)
f=math.sqrt(c)
h= d+e
if h<f:
  print('Yes')
else:
  print('No')

Fixed submission:
a =[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = input()
K = int(K)
K -= 1
print(a[K])

Buggy python submission (verdict: Runtime Error):
def nroot(a, n, x=1.0, eps=1e-10000000000):
    while abs(a - x**n) > eps:
        x = ( (n-1)*x + a/(x**(n-1)) ) / n
    return x

a,b,c =map(int,input().split())
d=nroot(a,2)
e=nroot(b,2)
f=nroot(c,2)

if d+e<f:
  print('Yes')
else:
  print('No')

Fixed submission:
a =[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = input()
K = int(K)
K -= 1
print(a[K])
Buggy python submission (verdict: Runtime Error):
from decimal import *

getcontext().prec = 1000000000
a,b,c =map(int,input().split())
d=math.sqrt(a)
e=math.sqrt(b)
f=math.sqrt(c)
h= d+e
if h<f:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c = map(int, input().split())
s =c-a-b
t = s**2 - 4*a*b
if s >=0 and t > 0:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
from decimal import *

getcontext().prec = 1000000000
a,b,c =map(int,input().split())
d=math.sqrt(a)
e=math.sqrt(b)
f=math.sqrt(c)
h= d+e
if h<f:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c = map(int, input().split())
s =c-a-b
t = s**2 - 4*a*b
if s >=0 and t > 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
print('Yes')

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy python submission (verdict: Runtime Error):
S = input()
S = int(S)
g=input()
f = list(g)
if len(f) == S:
  h =set(f)
  k = list(h)
  if len(h)==1:
    print('No')
  else :
    print('Yes')
else:
  pass

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy python submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :
  print('Yes')

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy python submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
print(f)
h =set(f)
k = list(h)
if len(k)==1:
  print('Yes')
else :
  print('No')

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy python submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
h =set(f)
if len(h)==1:
  print('No')
else :
  print('Yes')

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy python submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
print(f)
h =set(f)
if len(h)=1:
  print('Yes')
else :
  print('No')

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')
Buggy python submission (verdict: Runtime Error):
N = input()
if N % 2 == 0:
  print(N/2)
else:
  print(N//2 ＋1）
        

Fixed submission:
N = input()
N = int(N)
if N%2==0:
  a = N//2
  print(a)
else:
  b = N//2 +1
  print(b)
Buggy python submission (verdict: Runtime Error):
A,B,C =map(int,input().split())
if A==B==c:
  print("No")
else:
  print("Yes")

Fixed submission:
A,B,C =map(int,input().split())
if A==B==C:
  print("No")
elif A!=B and B!=C and C!=A:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N = input()
N = int(N)
A = list(map(int,input().split()))
B = [ i for i in A if i % 2 == 0 or ]
C = [ d for d in B if i % 3 == 0 or i % 5 == 0]
R = len(C)
if R == 0:
  print("APPROVED")
else:
  print("DENIED")

Fixed submission:
N = input()
N = int(N)
A = list(map(int,input().split()))
B = [ i for i in A if i % 2 ==0]
C = [ d for d in B if  d % 3 == 0 or d % 5 == 0]
R = len(C)
Q = len(B)
if R == Q:
  print("APPROVED")
  
else:
  print("DENIED")
Buggy python submission (verdict: Runtime Error):
S,T= map(strinput().split())
A=len(S)
B=len(T)
ptint(A,{},B)
U =input()
if U==S:
  A-=S
elif U==T:
  B-=1
else:
  pass

Fixed submission:
S,T= map(str,input().split())
A,B=map(int,input().split())
U =input()
if U==S:
  A-=1
elif U==T:
  B-=1
else:
  pass
print(A,B)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    A[np.where(A==b)] = c
    A = np.sort(A)
    print(np.sum(A))

Fixed submission:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
D = np.zeros((10**5)+1)
S = sum(A)
for i in range(len(A)):
    D[A[i]] += 1
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    S += D[b]*(c-b)
    D[c] += D[b]
    D[b] = 0
    print(int(S))

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    A[np.where(A==b)] = c
    A = np.sort(A)
    print(np.sum(A))

Fixed submission:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
D = np.zeros((10**5)+1)
S = sum(A)
for i in range(len(A)):
    D[A[i]] += 1
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    S += D[b]*(c-b)
    D[c] += D[b]
    D[b] = 0
    print(int(S))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    A[A==b] = c
    print(np.sum(A))

Fixed submission:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
D = np.zeros((10**5)+1)
S = sum(A)
for i in range(len(A)):
    D[A[i]] += 1
Q = int(input())
for _ in range(Q):
    b, c = list(map(int, input().split()))
    S += D[b]*(c-b)
    D[c] += D[b]
    D[b] = 0
    print(int(S))
Buggy python submission (verdict: Runtime Error):
import numpy as np
a = np.array(list(map(int, input().split())))
for i in range(5):
    if a[i] == 0:
        print(i+1)

Fixed submission:
a = list(map(int, input().split()))
for i in range(5):
    if a[i] == 0:
        print(i+1)
Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys
X, N = np.array(list(map(int, input().split())))
if N == 0:
    print(X)
    sys.exit()
p = np.array(list(map(int, input().split())))
p = np.sort(p)
a = np.ones(203, dtype = np.int)
a[p+103] = 0
m = X
n = 0
for i in range(203):
    if a[i] == 1:
        if m>abs(i-X-103):
            if i-X-103 != 0:
                m = abs(i-X-103)
                n = i-103
print(n)

Fixed submission:
import numpy as np
import sys
X, N = np.array(list(map(int, input().split())))
if N == 0:
    print(X)
    sys.exit()
p = np.array(list(map(int, input().split())))
p = np.sort(p)
a = np.ones(304, dtype = np.int)
a[p+102] = 0
m = X+1000
n = 0
for i in range(304):
    if a[i] == 1:
        if m>abs(i-X-102):
            m = abs(i-X-102)
            n = i-102
print(int(n))
Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
a = np.array(list(map(int, input().split())))
b = 1
for i in range(N):
    if b > 0:
        b *= a[i]
    if a[i] == 0:
        b = 0
    if b > 10**18:
        b = -1

print(b, end='')

Fixed submission:
import numpy as np
N = int(input())
a = list(map(int, input().split()))
b = 1
for i in range(N):
    if b > 0:
        b *= a[i]
    if a[i] == 0:
        b = 0
    if b > 10**18:
        b = -1

print(b, end='')
Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
a = np.array(list(map(int, input().split())))
l = 0
n = 1
b = 0
g = np.zeros(N+1)
g[0] = 1-a[0]
for i in range(N+1):
    if a[i] < 0:
        l = -1
for i in range(1, N+1):
    g[i] = (g[i-1]-a[i-1])*2
    if g[i] <= 0:
        l = -1
g[N] = a[N]
for i in range(1, N+1):
    if l<0:
        break
    b = N-i
    if g[b] > g[b+1]+a[b]:
        g[b] = g[b+1]+a[b]
    if g[b] <= 0:
        l = -1
        break
if a[0] != 0 or l == -1:
    print(-1)
else:
    print(int(sum(g)))

Fixed submission:
import numpy as np
h1, m1, h2, m2, k = np.array(list(map(int, input().split())))
h = h2 - h1
m = m2-m1
t = h*60 + m
print(t-k)
Buggy python submission (verdict: Runtime Error):
import numpy as np
t = input()
pre = 'D'
for i in range(len(t)):
    if t[i] == '?':
        t[i] = 'D'

Fixed submission:
import numpy as np
t = input()

print(t.replace('?', 'D'))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = input()
if len(a) < b:
    print(b[:a]+'...')
else:
    print(b)

Fixed submission:
a = int(input())
b = input()
if len(b) > a:
    print(b[:a]+'...')
else:
    print(b)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))

g = 0
for i in range(n):
  tmp = a[i+1]-a[i]
  if tmp > g:
    g = tmp

print(k-g)

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

g = 0
for i in range(n-1):
  tmp = a[i+1]-a[i]
  if tmp > g:
    g = tmp
tmp = a[0] + (k - a[n-1])
if tmp > g:
  g = tmp

print(k-g)
Buggy python submission (verdict: Runtime Error):
al = [list(map(int, input().split())) for i in range(3)]
al = sum(a, [])
n = int(input())
bl = [int(input()) for i in range(n)]
check = [0 for i in range(9)]

for b in bl:
    if b in al:
        check[al.index(b)] = 1

if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[3:8:2]]:
    print("Yes")
else:
    print("No")

Fixed submission:
al = [list(map(int, input().split())) for i in range(3)]
al = sum(al, [])
n = int(input())
bl = [int(input()) for i in range(n)]
check = [0 for i in range(9)]

for b in bl:
    if b in al:
        check[al.index(b)] = 1

if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[2:8:2]]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]
cnt = 0

for l in a:
    tmp = 0
    for i in range(m):
        tmp += b[i]*a[i]
    tmp += c
    if tmp > 0:
        cnt += 1

print(cnt)

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

for l in a:
    tmp = 0
    for i in range(m):
        tmp += b[i]*l[i]
    tmp += c
    if tmp > 0:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
n = int(input())
dic_items = {-1:'z',0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append(n%26)
  n = n//26
#print(ans)
for i in range(len(ans)):
  if ans[i] == 0:
    j = i+1
    if j < len(ans):
      ans[j] -= 1
      if j == len(ans)-1:
        ans[i] = 26
    else:
      ans.pop()
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]-1],end='')

Fixed submission:
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  n -= 1
  ans.append(n%26)
  n = n//26
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]],end='')

Buggy python submission (verdict: Runtime Error):
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append(n%26)
  n = n//26
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]-1],end='')

Fixed submission:
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  n -= 1
  ans.append(n%26)
  n = n//26
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]],end='')
Buggy python submission (verdict: Time Limit Exceeded):
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
if ans < 0:
  print(-1)
else:
  print(ans)


Fixed submission:
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
      break
if ans < 0:
  print(-1)
else:
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
over = 10**18

n = int(input())
a = list(map(int, input().split()))
ans = 1;
for i in range(n):
  ans = ans * a[i]
  if ans > over:
    ans = -1
if ans < 0:
  print(-1)
else:
  print(ans)


Fixed submission:
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
      break
if ans < 0:
  print(-1)
else:
  print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

over = 10**8

n = int(input())
a = list(map(int, input().split()))
ans = 1;
for i in range(n):
  ans = ans * a[i]
  if ans > over:
    ans = -1
if ans < 0:
  print(-1)
else:
  print(ans)

Fixed submission:
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
      break
if ans < 0:
  print(-1)
else:
  print(ans)

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

over = 10**18

n = int(input())
a = list(map(int, input().split()))
ans = 1;
for i in range(n):
  ans = ans * a[i]
  if ans > over:
    ans = -1
if ans < 0:
  print(-1)
else:
  print(ans)
  

Fixed submission:
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
      break
if ans < 0:
  print(-1)
else:
  print(ans)

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

n = int(input())
a = list(map(int, input().split()))
ans = 1;
for i in range(n):
  ans = ans * a[i]
  if ans > 10**18:
    ans = -1
if ans < 0:
  print(-1)
else:
  print(ans)
  

Fixed submission:
over = 10**18

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

for i in range(n):
  if a[i] == 0:
    ans = 0
if not ans == 0:
  for i in range(n):
    ans = ans * a[i]
    if ans > over:
      ans = -1
      break
if ans < 0:
  print(-1)
else:
  print(ans)