Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
collect=[]
pen=[]
sum=0
for i in range(m):
  p,s=input().split()
  if p not in collect:
    if s=='WA':
      pen.append(p)
    else:
      collect.append(p)
      sum=sum+pen.count(p)
print(len(collect),sum)

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

submit = []
for i in range(m):
    temp = [x for x in input().split()]
    submit.append(temp)

ac = [0] * (n + 1)
wa = [0] * (n + 1)

for i in range(m):
    result = submit[i][1]
    question = int(submit[i][0])

    if result == 'AC' and ac[question] == 0:
        ac[question] = 1
    elif result == 'WA' and ac[question] == 0:
        wa[question] += 1

for i in range(n + 1):
    if ac[i] != 1:
        wa[i] = 0

print(sum(ac), sum(wa))

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
collect=[]
pen=[]
sum=0
for i in range(m):
  p,s=input().split()
  if p not in collect:
    if s=='WA':
      pen.append(p)
    else:
      collect.append(p)
      sum=sum+pen.count(p)
print(len(collect),sum-len(list))

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

submit = []
for i in range(m):
    temp = [x for x in input().split()]
    submit.append(temp)

ac = [0] * (n + 1)
wa = [0] * (n + 1)

for i in range(m):
    result = submit[i][1]
    question = int(submit[i][0])

    if result == 'AC' and ac[question] == 0:
        ac[question] = 1
    elif result == 'WA' and ac[question] == 0:
        wa[question] += 1

for i in range(n + 1):
    if ac[i] != 1:
        wa[i] = 0

print(sum(ac), sum(wa))

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
list=[]
sum=0
for i in range(m):
  p,s=input().split()
  if s='AC':
    list.append(p)
  else:
    if p not in list:
      sum=sum+1
print(sum)

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

submit = []
for i in range(m):
    temp = [x for x in input().split()]
    submit.append(temp)

ac = [0] * (n + 1)
wa = [0] * (n + 1)

for i in range(m):
    result = submit[i][1]
    question = int(submit[i][0])

    if result == 'AC' and ac[question] == 0:
        ac[question] = 1
    elif result == 'WA' and ac[question] == 0:
        wa[question] += 1

for i in range(n + 1):
    if ac[i] != 1:
        wa[i] = 0

print(sum(ac), sum(wa))
Buggy python submission (verdict: Runtime Error):
n=int(input())
xy=[]
for i in range(n):
  a=int(input())
  xy.append([list(map(int,input().split())) for j in range(a)])

ans=0
for i in range(2**n):
  honest=[]
  for j in range(n):
    if (i>>j)&1:
      honest.append(1)
    else:
      honest.append(0)
  p=0
  for j,k in enumerate(honest):
    if k==1:
      r=0
      for l in xy[j]:
        if honest[l[0]-1]!=l[1]:
          r=1
          break    
      if r==0:
        p=p+1
  if p==sum(honest):
    ans=p
print(max(ans))

Fixed submission:
a,b,c=map(int,input().split())
print('win' if a+b+c<=21 else 'bust')
Buggy python submission (verdict: Runtime Error):
s=input()
hug=0
for i in range(len(s)//2):
  if s[i]!=s[n-1-i]:
    hug=hug+1
print(hug)

Fixed submission:
s=input()
hug=0
for i in range(len(s)//2):
  if s[i]!=s[len(s)-1-i]:
    hug=hug+1
print(hug)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
t=[]
for i in range(n):
  t.append(s[i])
p=0
for i in range(10):
  pi=t.find(str(i))
  if pi==-1:
    continue
  for j in range(10):
    pj=t.find(str(j),pi)
    if pj==-1:
      continue
    for k in range(10):
      pk=t.find(str(k),pj)
      if pk==-1:
        continue
      p=p+1
print(p)

Fixed submission:
n=int(input())
s=input()
p=0
for i in range(10):
  pi=s.find(str(i))
  if pi==-1:
    continue
  for j in range(10):
    pj=s.find(str(j),pi+1)
    if pj==-1:
      continue
    for k in range(10):
      pk=s.find(str(k),pj+1)
      if pk==-1:
        continue
      p=p+1
print(p)
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
if a*10**9+b*10<=x:
  print(1000000000)
else:
  n=0
  for i in reversed(range(1,10)):
    max=(x-b*i)//a
    if len(str(max))==i:
      n=max
      break
    elif 10**(i-1)<=max<10**i:
      n=max
      break
  print(n)

Fixed submission:
s=input()
week=['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-week.index(s))
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
list=ABCDEFGHIJKLMNOPQRSTUVWXYZ
for i in range(len(s)):
  x=list[(list.index(s[i])+n)%26]
  s.replace(s[i],x)
print(s)

Fixed submission:
n=int(input())
s=input()
t='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
  x=t[(t.index(s[i])+n)%26]
  s=s[:i]+x+s[i+1:]
print(s)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
list=ABCDEFGHIJKLMNOPQRSTUVWXYZ
for i in range(len(s)):
  x=list[(list.index(s[i])+n)%26]
  s.replace(s[i],x)

Fixed submission:
n=int(input())
s=input()
t='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
  x=t[(t.index(s[i])+n)%26]
  s=s[:i]+x+s[i+1:]
print(s)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
m=n//2
t=s[:m]
print('Yes' if s=t+t else 'No')

Fixed submission:
n=int(input())
s=input()
m=n//2
t=s[:m]
print('Yes' if s==t+t else 'No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))

m=0
for i in range(n):
  if a[i+1]==a[i]+1:
    m=m+c[i]

print(sum(b)+m)

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

m=0
for i in range(n-1):
  if a[i+1]==a[i]+1:
    m=m+c[a[i]-1]

print(sum(b)+m)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))

import math
l=[0]
r=[0]
for i in range(n-1):
  l.append(math.gcd(l[i],a[i]))
  r.append(math.gcd(r[i],a[n-i-1]))
m=[]
for i in range(n):
  m.append(math.gcd(l[i],r[n-i-1]))
print(max(m))

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

import fractions as math

l=[0]
r=[0]
for i in range(n-1):
  li=math.gcd(l[i],a[i])
  l.append(li)
  ri=math.gcd(r[i],a[n-i-1])
  r.append(ri)
m=[]
for i in range(n):
  mi=math.gcd(l[i],r[n-i-1])
  m.append(mi)

print(max(m))
Buggy python submission (verdict: Runtime Error):
n = str(input())
if int(n)==10000:
    print(0)
else:
    print(1000-int(n[1:4]))

Fixed submission:
n = int(input())

if n <= 1000:
    print(1000-n)
elif 1000< n <=2000:
    print(2000-n) 
elif 2000< n <=3000:
    print(3000-n)
elif 3000< n <=4000:
    print(4000-n)
elif 4000< n <=5000:
    print(5000-n)
elif 5000< n <=6000:
    print(6000-n)
elif 6000< n <=7000:
    print(7000-n)
elif 7000< n <=8000:
    print(8000-n)
elif 8000< n <=9000:
    print(9000-n)
elif 9000< n <=10000:
    print(10000-n)

Buggy python submission (verdict: Runtime Error):
n = str(input())
print(int(n[1:4]))

Fixed submission:
n = int(input())

if n <= 1000:
    print(1000-n)
elif 1000< n <=2000:
    print(2000-n) 
elif 2000< n <=3000:
    print(3000-n)
elif 3000< n <=4000:
    print(4000-n)
elif 4000< n <=5000:
    print(5000-n)
elif 5000< n <=6000:
    print(6000-n)
elif 6000< n <=7000:
    print(7000-n)
elif 7000< n <=8000:
    print(8000-n)
elif 8000< n <=9000:
    print(9000-n)
elif 9000< n <=10000:
    print(10000-n)
Buggy python submission (verdict: Runtime Error):
import numpy as np
def calc_double(nn):
    return nn -x

x,n = list(map(int,input().split()))
p= list(map(int,input().split()))
p_all = list(range(-200,200,1))

for i in enumerate(p):
    l_in = [s for s in p_all if s not in p]

data2 = []
for val in l_in:
    data2.append(abs(calc_double(val)))

min_index =np.argmin(data2)
print(l_in[min_index])

Fixed submission:
import numpy as np
def calc_double(nn):
    return nn -x

x,n = list(map(int,input().split()))
p= list(map(int,input().split()))
p_all = list(range(-200,200,1))

l_in = [s for s in p_all if s not in p]

data2 = []
for val in l_in:
    data2.append(abs(calc_double(val)))

min_index =np.argmin(data2)
print(l_in[min_index])
Buggy python submission (verdict: Runtime Error):
a,b,c,k=(int(x) for x in input().split())

a1 = a
nokori = 0
nokori_1 = 0
nokori_2 = 0
tensuu = 0

if k-a1 > 0:
   tensuu +=a1
   nokori = k-a


if nokori > 0:
   tensuu +=0
   nokori2 =nokori - b 
if nokori2 > 0:
    tensuu -= nokori2

print(tensuu)

Fixed submission:
a,b,c,k=(int(x) for x in input().split())

a1 = a
nokori = 0
nokori_1 = 0
nokori_2 = 0
tensuu = 0

if k-a1 > 0:
   tensuu +=a1
   nokori = k-a

if nokori > 0:
   tensuu +=0
   nokori2 =nokori - b
   if nokori2 > 0:
        tensuu -= nokori2
if k - a1 <= 0:
    tensuu = k
print(tensuu)
Buggy python submission (verdict: Runtime Error):
import numpy
import bisect

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if K - A[i] < 0:
        break
    b = bisect.bisect(B, K - A[i])
    ans = max(ans, i+b-1)

print(ans)

Fixed submission:
import numpy
import bisect

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if K - A[i] < 0:
        break
    b = bisect.bisect(B, K - A[i])
    ans = max(ans, i+b-1)

print(ans)

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

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if A[i] > K:
        break
    for j in range(M+1):
        if A[i] + B[j] <= K:
            ans = max(i+j,ans)
        else :
            break

print(ans)

Fixed submission:
import numpy
import bisect

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if K - A[i] < 0:
        break
    b = bisect.bisect(B, K - A[i])
    ans = max(ans, i+b-1)

print(ans)

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

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if A[i] > K:
        break
    for j in range(M+1):
        if A[i] + B[j] <= K:
            ans = max(i+j,ans)
        else :
            break

print(ans)

Fixed submission:
import numpy
import bisect

N,M,K = map(int, input().split())
ans = 0
A = list(map(int,input().split()))
B = list(map(int,input().split()))

A = numpy.cumsum(numpy.array(A))
A = list(A)
A.insert(0, 0)
B = numpy.cumsum(numpy.array(B))
B = list(B)
B.insert(0, 0)
ans = 0

for i in range(N+1):
    if K - A[i] < 0:
        break
    b = bisect.bisect(B, K - A[i])
    ans = max(ans, i+b-1)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())
ans = 0

for i in range(1,N+1):
    a = make_divisors(i)
    a = len(a)
    ans += i * a 
    #print(i*a)

print(ans)

Fixed submission:
import math
n = int(input())
ans = 0

for i in range(1,n+1):
    N = math.floor(n / i)
    l = i * N
    s = N / 2 * (i + l)
    ans += s

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

ans = 1

for i in A:
    ans *= i

if ans > 10**18:
    print(-1)
else:
    print(ans)

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

A = sorted(A, reverse= True)

if A[-1] == 0:
    print(0)
    exit()
    
ans = 1

for i in A:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
ans = 0
B = N
for z in range(2, int(N**(1/2))+1):
    if B == 1:
        break
    if B < z:
        break
    cnt = len(factorization(z))
    if cnt == 1 and B % z == 0:
        B = B // z
        #print(z)
        ans += 1

if(N == 1):
    print(0)
elif(N != 1 and ans == 0):
    print(1)
else:
    print(ans)


Fixed submission:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
ans = 0

A = factorization(N)

for x in A:
    e = x[1]
    for y in range(1,N):
        if e >= y:
            e -= y
            ans += 1
        else:
            break

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
ans = 0
B = N
for z in range(2, int(N**(1/2))+1):
    if B == 1:
        break
    if B < z:
        break
    cnt = len(factorization(z))
    if cnt == 1 and B % z == 0:
        B = B // z
        #print(z)
        ans += 1

if(N == 1):
    print(0)
elif(N != 1 and ans == 0):
    print(1)
else:
    print(ans)

Fixed submission:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
ans = 0

A = factorization(N)

for x in A:
    e = x[1]
    for y in range(1,N):
        if e >= y:
            e -= y
            ans += 1
        else:
            break

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

n = 0
B = set(A)

for k in B:
    cnt = A.count(k)
    n +=  cnt * (cnt-1) // 2

for i in range(N):
    a = A[i]
    print(n - A.count(a) + 1)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)

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

n = 0
C = set(A)

for k in C:
    cnt = A.count(k)
    n +=  cnt * (cnt-1) // 2

for i in range(N):
    a = A[i]
    print(n - A.count(a) + 1)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)

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

n = 0
C = set(A)

for k in C:
    cnt = A.count(k)
    n +=  cnt * (cnt-1) // 2

for k in range(N):
    a = A[k]
    print(n - A.count(a) + 1)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)

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

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

n = 0
C = set(A)

for k in C:
    cnt = A.count(k)
    n +=  cnt * (cnt-1) // 2

for k in range(N):
    a = A[k]
    print(n - A.count(a) + 1)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)

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

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

ans = 0
C = set(A)

for k in range(N):
    B = copy.copy(A)
    #k = k + 1
    del B[k]
    for x in C:
        cnt = B.count(x)
        ans += cnt * (cnt-1) // 2
        cnt = 0
    print(ans)
    ans = 0

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)

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

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

ans = 0

for k in range(N):
    B = copy.copy(A)
    #k = k + 1
    del B[k]
    for x in range(N):
        cnt = B.count(x+1)
        ans += cnt * (cnt-1) // 2
        cnt = 0
    print(ans)
    ans = 0

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

n = 0
B = set(A)

C = Counter(A)

for i in C.keys():
    n += C[i] * (C[i]-1) // 2

for i in range(N):
    a = A[i]
    print(n - C[a] + 1)
Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
Q = int(input())
t = 0

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        if t == 0:
            t = 1
        else:
            t = 0

    elif (A[1] == "1" and t == 0) or (A[1] == "2" and t == 1):
        S = A[2] + S
    else:
        S = S + A[2]

if t == 1:
    S = S[::-1]

print(S)

Fixed submission:
from collections import deque

S = str(input())
Q = int(input())
t = 0

d = deque()
d.append(S)

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        if t == 0:
            t = 1
        else:
            t = 0

    elif (A[1] == "1" and t == 0) or (A[1] == "2" and t == 1):
        d.appendleft(A[2])
    else:
        d.append(A[2])

l = list(d)
ans = "".join(l)
if t == 1:
    ans = ans[::-1]
print(ans)

Buggy python submission (verdict: Runtime Error):
S = str(input())
Q = int(input())
t = 0

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        if t == 0:
            t = 1
        else:
            t = 0

    elif (A[1] == "1" and t == 0) or (A[1] == "2" and t == 1):
        S = A[2] + S
    else:
        S = S + A[2]

if t == 1:
    S = s[::-1]

print(S)

Fixed submission:
from collections import deque

S = str(input())
Q = int(input())
t = 0

d = deque()
d.append(S)

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        if t == 0:
            t = 1
        else:
            t = 0

    elif (A[1] == "1" and t == 0) or (A[1] == "2" and t == 1):
        d.appendleft(A[2])
    else:
        d.append(A[2])

l = list(d)
ans = "".join(l)
if t == 1:
    ans = ans[::-1]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
Q = int(input())

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        S = S[::-1]
    elif A[1] == "2":
        S = S + A[2]
    else:
        S = A[2] + S

print(S)

Fixed submission:
from collections import deque

S = str(input())
Q = int(input())
t = 0

d = deque()
d.append(S)

for _ in range(Q):
    A = list(input().split())
    if A[0] == "1":
        if t == 0:
            t = 1
        else:
            t = 0

    elif (A[1] == "1" and t == 0) or (A[1] == "2" and t == 1):
        d.appendleft(A[2])
    else:
        d.append(A[2])

l = list(d)
ans = "".join(l)
if t == 1:
    ans = ans[::-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
SC = [list(map(int, input().split())) for _ in range(M)]
ans = []
SC = sorted(SC)

for x, item in enumerate(SC):
    if len(ans) + 1 < item[0]:
        if len(ans) == 0:
            ans.append(1)
        for y in range(item[0] -len(ans) - 1):
            ans.append(0)
    if len(ans) + 1 == item[0]:
        ans.append(item[1])
    elif len(ans) == item[0]:
        continue

if len(ans) < N:
    for x in range(N - len(ans)):
        ans.append(0)

if ans(0) == 0 and len(ans) != 0:
    print(-1)
else:
    ans = map(str, ans)
    print("".join(ans))

Fixed submission:
N = int(input())

print(-(-N // 2))
Buggy python submission (verdict: Runtime Error):
import numpy as np
import numpy

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[K]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

Fixed submission:
import numpy as np
import numpy

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[K-1]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

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

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[2]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

Fixed submission:
import numpy as np
import numpy

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[K-1]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

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

N,K = map(int, input().split())
P = list(map(int,input().split()))
M = 0

S = numpy.cumsum(P)
P.append(0)

for i in range(1,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

Fixed submission:
import numpy as np
import numpy

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[K-1]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
P = list(map(int,input().split()))
P.append(0)
M = 0

for i in range(N):
    if P[i+K-1] == 0:
        break
    B = P[i:i+K]
    S = sum(B)
    M = max(M, S)

ans = 0.5 * (M + K)

print(ans)

Fixed submission:
import numpy as np
import numpy

N,K = map(int, input().split())
P = list(map(int,input().split()))

S = numpy.cumsum(P)
P.append(0)
M = S[K-1]

for i in range(0,N):
    if P[i+K] == 0:
        break
    A = S[i+K] - S[i]
    M = max(M, A)

ans = 0.5 * (M + K)

print(ans)