Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
mylist=[]

mylist= map(int,input().rstrip().split())
mylist= map(int,input().rstrip().split())
mylist = map(int,input().rstrip().split())

num = int(input())

for i in range(num):
    x = map(int,input().rstrip().split())
    k=0
    for j in mylist:
      if j==x:
        mylist[k]=0
      k+=1
            
bingo(0,1,2)
bingo(3,4,5)
bingo(6,7,8)
bingo(0,3,6)
bingo(1,4,7)
bingo(2,5,8)
bingo(0,4,8)
bingo(2,4,6)

      
def bingo(x,y,z):
  if mylist[a]==0 and mylist[b]==0 mylist[c]==0:
    print("Yes")
  else:
    print("No")

print(result)

Fixed submission:

a,b,c= map(int,input().rstrip().split())
d,e,f= map(int,input().rstrip().split())
g,h,i= map(int,input().rstrip().split())

mylist=[a,b,c,d,e,f,g,h,i]
num = int(input())

for i in range(num):
    x = int(input())
    k=0
    for j in mylist:
      if j==x:
        mylist[k]=0
      k+=1

x=0
def bingo(a,b,c):
  global x
  if mylist[a]==0 and mylist[b]==0 and mylist[c]==0:
    x=1
      
      
bingo(0,1,2)
bingo(3,4,5)
bingo(6,7,8)
bingo(0,3,6)
bingo(1,4,7)
bingo(2,5,8)
bingo(0,4,8)
bingo(2,4,6)


if x==1:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input())#入力回数を決める

l=[]
num2=1
num3=1
l = list(map(int,input().rstrip().split()))
for i in range(N):
  
  if l[i] % 2 == 0:
    if l[i] % 3 == 0 and l[i] % 5 == 0:
      num2=0
    else:
      num3=0


  


        
if num2==0:
  if num3==0:
    print("DENIED")
  else:
    print("APPROVED")
else:
  print("DENIED")

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

if a==b or a==c or b==c:
  if a==b and a==c:
    print("No")
  else:
    print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A = []
A11,A12,A13 = map(int, input().split())
A21,A22,A23 = map(int, input().split())
A31,A32,A33 = map(int, input().split())
N = int(input())
B = []
for i in range(N):
  B.append(int(input()))
  
A = [[A11,A12,A13],
     [A21,A22,A23],
     [A31,A32,A33]]

sets = []

for i in range(3):
  s = []
  for j in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
for j in range(3):
  s = []
  for i in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
sets.append([A11,A22,A33])
sets.append([A13,A22,A31])

for s in sets:
  count = 0
  for b in B:
    if b in s : 
      count+=1
  if count == 3:
    print("Yes")
    break
else:
  print("No")

Fixed submission:
N = int(input())
print(N // 2 + N % 2)

Buggy python submission (verdict: Runtime Error):
N = input()
print(N // 2 + N % 2)

Fixed submission:
N = int(input())
print(N // 2 + N % 2)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = row_input()

b = s.split('/')

b[0].replace('7','8')


# 出力
print('/'.join(b))

Fixed submission:
s = input()

b = s.split('/')

b[0] = b[0].replace('7','8')

print('/'.join(b))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
C = []
S = []
F = []
T = [0 for i in range(N)]

for i in range(N-1):
    c,s,f = map(int,input().split())
    C.append(c)
    S.append(s)
    F.append(f)

for i in range(1,N):
    time = 0
    if i == 1:
        #print(S[-i])
        time = S[-i] + C[-i]
    else:
        time = S[-i] + C[-i]
        for j in range(1,i):
            if time < S[-(i-j)]:
                time = S[-(i-j)] + C[-(i-j)]
            else:
                n = 1
                while True:
                    dev = S[-(i-j)] + n * F[-(i-j)] - time
                    if(0 <= dev and dev <  F[-(i-j)]):
                          time = (time + dev + C[-(i-j)])
                          break
                    n+=1
    T[-(i+1)] = time

for t in T:
    print(t)

Fixed submission:
N = int(input())
C = []
S = []
F = []
T = [0 for i in range(N)]

for i in range(N-1):
    c,s,f = map(int,input().split())
    C.append(c)
    S.append(s)
    F.append(f)

for i in range(1,N):
    time = 0
    if i == 1:
        #print(S[-i])
        time = S[-i] + C[-i]
    else:
        time = S[-i] + C[-i]
        for j in range(1,i):
            if time < S[-(i-j)]:
                time = S[-(i-j)] + C[-(i-j)]
            else:
                dev = (time - S[-(i-j)]) % F[-(i-j)]
                if(dev != 0):
                    time = (time + (F[-(i-j)] - dev) + C[-(i-j)])
                else:
                    time = time + C[-(i-j)]
    T[-(i+1)] = time

for t in T:
    print(t)
Buggy python submission (verdict: Runtime Error):
def main():
    s, c = map(int, raw_input().split())
    count = 0
    for i in range(s):
        if(c >= 2):
            count += 1
            c -= 2
        else:
            break
    for i in range(c):
        if(c >= 4):
            count += 1
            c -= 4
        else:
            break
    return count

print main()

Fixed submission:
def main():
    s, c = map(int, raw_input().split())
    count = 0
    if s > c/2:
        return c/2
    elif s == c/2:
        return s
    elif s < c/2:
        return s + ((c-2*s)/4)
print main()

Buggy python submission (verdict: Runtime Error):
def main():
    s, c = map(int, input.row().split())
    count = 0
    for i in range(s):
        if(c >= 2):
            count += 1
            c -= 2
        else:
            break
    for i in range(c):
        if(c >= 4):
            count += 1
            c -= 4
        else:
            break
    return count

print main()

Fixed submission:
def main():
    s, c = map(int, raw_input().split())
    count = 0
    if s > c/2:
        return c/2
    elif s == c/2:
        return s
    elif s < c/2:
        return s + ((c-2*s)/4)
print main()
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(raw_input())
    x = map(int, raw_input().split())
    #-1:remove , 0:singe , 1~:label 
    check= [0] * N
    flag = False
    label = 1
    c = 0
    x.sort()

    #labeling
    for i in range(N):
        for j in range(N):
            if(i != j):
                if(x[i] == x[j]):
                    flag = True
        if flag:
            if i > 0:
                if(x[i] != x[i-1]):
                    label += 1
                    check[i] = label
                else:
                    check[i] = label
            else:
                check[i] = label
        flag = False
    
    #removing
    for i in range(N-1):
        if(check[i] > 0 and check[i+1] == check[i]):
            for j in range(N):
                if(check[i] != check[j] and check[j] > 0 and flag == False):
                     check[i] = -1
                     check[j] = -1
                     if j < N-2:
                         check[j+1] != check[j+2]
                         check[j+1] = 0
                     else:
                         check[j+1] = 0
                     flag = True
            if flag == False:     
                check[check.index(0)] = -1
                check[i] = -1
            else:
                flag = False
        elif check[i] != -1:
            check[i] = 0
    for i in range(N):
        if check[i] == 0:
            c += 1
    return c
print main()

Fixed submission:
def main():
    x = int(raw_input())
    if x > 6:
       if (x - 6) % 11 == 0:
           op1 = (x - 6)/11
           op2 = x/11 + 1
       elif x % 11 == 0 :
           op1 = (x - 6)/11 + 1
           op2 = x/11
       else:
           op1 = (x - 6)/11 + 1
           op2 = x/11 + 1
       return op1+op2
    else:
        return 1
print main()
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
s = []
c = []
for _ in range(m):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

if n == 1:
    for i in range(10):
        istr = str(i)
        flag = True #このTrueは毎回新しくTrueになる
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            if flag == True:
                print(i)
                break
else: # n!=1
    for i in range(10**(n-1),10**n):
        istr = str(i)
        flag = True
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            else: #あっていた場合何もしない
                pass
        if flag:
            print(i)
            break

Fixed submission:
n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))

Buggy python submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
    index = digit - 1
    if res[index] == 0:
        res[index] = number
    else: #　すでに他の値が入っている場合
        if res[index] >= number: #　新しいnumberの方が小さい場合
            res[index] = number
        else:
            pass

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
    print(res)
else:
    print(-1)

Fixed submission:
n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))

Buggy python submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])
  
res = [0 for i in range(N)]
for digit, number in zip(s,c):
    digit -= 1
    if not res[digit] == 0:
        if res[digit] <= number:
            res[digit] = numer
        else:
            continue
    res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if convert[0] == 0:
    print(-1)
elif len(str(res)) == N:
    print(res)
else:
    print(-1)

Fixed submission:
n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))

Buggy python submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
  digit -= 1
  res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
  print(res)
else:
  print(-1)

Fixed submission:
n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))
Buggy python submission (verdict: Runtime Error):
n = int(input())
array = [int(input()) for i in range(n)]
def shift_only(array):
    tmp = []
    counter = 0
    while True:
        flag = True
        for num in array:
            if num%2 != 0:
                flag = False
        if flag == False:
            break
        array = [i/2 for i in array]
        counter +=1
    print(counter)
shift_only(array)

Fixed submission:
string = input()
counter = 0
for ele in string:
    if ele == "1":
        counter += 1
print(counter)

Buggy python submission (verdict: Runtime Error):
n = int(input())
array = [int(input()) for i in range(n)]
def shift_only(array):
    tmp = []
    counter = 0
    while True:
        flag = True
        # 全て偶数かを確認
        for num in array:
            if num%2 != 0:
                flag = False
        if flag == False:
            break
        array = [i/2 for i in array]
        counter +=1
    print(counter)
shift_only(array)

Fixed submission:
string = input()
counter = 0
for ele in string:
    if ele == "1":
        counter += 1
print(counter)

Buggy python submission (verdict: Runtime Error):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(raw_input())
a = map(int, raw_input().split())
ans = min(map(how_many_times_divisible, a))
 
print ans

Fixed submission:
string = input()
counter = 0
for ele in string:
    if ele == "1":
        counter += 1
print(counter)
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
ans = [-1]*n
for i in range(m):
    s,c = list(map(int,input().split()))
    if ans[s-1] != -1 and ans[s-1] != c:
        ans = -1
        break
    ans[s-1] = c
    if s == 1 and n != 1 and c == 0:
        ans = -1
        break    
if ans[0] == -1 and n != 1:
    ans[0] = 1
if ans != -1:
    for i in range(n):
        if ans[i] == -1:
            ans[i] = '0'
        else:
            ans[i] = str(ans[i])
    print(''.join(ans))
else:
    print(ans)

Fixed submission:
n,m = list(map(int,input().split()))
ans = [-1]*n
for i in range(m):
    s,c = list(map(int,input().split()))
    if ans[s-1] != -1 and ans[s-1] != c:
        ans = -1
        break
    ans[s-1] = c
    if s == 1 and n != 1 and c == 0:
        ans = -1
        break    

if ans != -1:
    if ans[0] == -1 and n != 1:
        ans[0] = 1
    for i in range(n):
        if ans[i] == -1:
            ans[i] = '0'
        else:
            ans[i] = str(ans[i])
    print(''.join(ans))
else:
    print(ans)

Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
ans = [-1]*n
if m == 0:
    print(0)
else:
    for i in range(m):
        s,c = list(map(int,input().split()))
        if ans[s-1] != -1 and ans[s-1] != c:
            ans = -1
            break
        ans[s-1] = c
        if s == 1 and n != 1 and c == 0:
            ans = -1
            break    
    if ans[0] == -1:
        print(-1)
    elif ans != -1:
        for i in range(n):
            if ans[i] == -1:
                ans[i] = '0'
            else:
                ans[i] = str(ans[i])
        print(''.join(ans))
    else:
        print(ans)

Fixed submission:
n,m = list(map(int,input().split()))
ans = [-1]*n
for i in range(m):
    s,c = list(map(int,input().split()))
    if ans[s-1] != -1 and ans[s-1] != c:
        ans = -1
        break
    ans[s-1] = c
    if s == 1 and n != 1 and c == 0:
        ans = -1
        break    

if ans != -1:
    if ans[0] == -1 and n != 1:
        ans[0] = 1
    for i in range(n):
        if ans[i] == -1:
            ans[i] = '0'
        else:
            ans[i] = str(ans[i])
    print(''.join(ans))
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b = list(map(int,input().split()))
mod = 10**9 + 7
ans = (pow(2,n,mod) - 1
numerator = 1
denominator = 1

for i in range(1,n+1):
    numerator = (numerator*(n-i+1))%mod
    denominator = (denominator*i)%mod
    if i == a or i == b:
        ans = ans - (numerator*pow(denominator,mod-2,mod))%mod
        if i == b:
            break

print(ans%mod)

Fixed submission:
n,a,b = list(map(int,input().split()))
mod = 10**9 + 7

ans = (pow(2,n,mod) - 1) %mod
numerator = 1%mod
denominator = 1%mod
for i in range(1,b+1):
    numerator = (numerator*(n+1-i))%mod
    denominator = (denominator*pow(i,mod-2,mod))%mod
    if i == a or i == b:
        ans = (ans - (numerator*denominator))%mod

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = list(map(int,input().split()))
mod = 10**9 + 7
ans = (pow(2,n) - 1)% mod
numerator = 1
denominator = 1

for i in range(1,n+1):
    numerator = (numerator*(n-i+1))%mod
    denominator = (denominator*i)%mod
    if i == a or i == b:
        ans -= (numerator*pow(denominator,mod-2,mod))%mod
        if i == b:
            break

print(ans%mod)

Fixed submission:
n,a,b = list(map(int,input().split()))
mod = 10**9 + 7

ans = (pow(2,n,mod) - 1) %mod
numerator = 1%mod
denominator = 1%mod
for i in range(1,b+1):
    numerator = (numerator*(n+1-i))%mod
    denominator = (denominator*pow(i,mod-2,mod))%mod
    if i == a or i == b:
        ans = (ans - (numerator*denominator))%mod

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = int(N**0.5)
ans = 10**6
for x in range(0,a+1):
    b = N / x
    if b == int(b):
        if a + b - 2 < ans:
            ans = a+b-2
print(ans)

Fixed submission:
N = int(input())
a = int(N**0.5)
ans = 10 ** 12
for x in range(1,a+1):
    b = N / x
    if b == int(b):
        if x + b - 2 < ans:
            ans = x+b-2
print(int(ans))
Buggy python submission (verdict: Runtime Error):
import math
a,b,x = list(map(int,input().split()))
if a*b*0.5*a > x:
    c = (2*x) / (a*b)
    ans = 90 - math.degrees(math.atan(c/b))
    print(ans)
else:
    c = (2*x) / a**2 - b
    ans = 90 - math.degrees(math.atan(a/(b-c)))
    print(ans)

Fixed submission:
import math
a,b,x = list(map(int,input().split()))
if a*b*0.5*a > x:
    c = (2*x) / (a*b)
    ans = 90 - math.degrees(math.atan(c/b))
    print(ans)
else:
    c = (2*x) / a**2 - b
    if b-c == 0:
        ans = 0
    else:
        ans = 90 - math.degrees(math.atan(a/(b-c)))
    print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b,x = list(map(int,input().split()))
# b*c*1/2 * a = x
if a*b*0.5*a > x:
    c = (2*x) / (a*b)
    ans = 90 - math.degrees(math.atan(c/b))
    print(ans)
else:
    c = (2*x) / a**2 - b
# (b+c)*a *1/2 *a = x
    ans = 90 - math.degrees(math.atan(a/(b-c)))
    print(ans)


Fixed submission:
import math
a,b,x = list(map(int,input().split()))
if a*b*0.5*a > x:
    c = (2*x) / (a*b)
    ans = 90 - math.degrees(math.atan(c/b))
    print(ans)
else:
    c = (2*x) / a**2 - b
    if b-c == 0:
        ans = 0
    else:
        ans = 90 - math.degrees(math.atan(a/(b-c)))
    print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as numpy
from scipy.sparse.csgraph import floyd_warshall

N,M,L = map(int,input().split())
gurahu = np.zeros((N,N))

for k in range(M):
    a,b,c = map(int,input().split())
    gurahu[a-1,b-1] = c
    gurahu[b-1,a-1] = c

gurahu = floyd_warshall(gurahu, directed=False)
gurahu = np.where(gurahu <= L and gurahu > 0, 1, 0)
gurahu = floyd_warshall(gurahu) - np.ones((N, N))

Q = int(input())

for k in range(Q):
    s,t = map(int,input().split())
    print(gurahu[s-1,t-1])

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import floyd_warshall

N,M,L = map(int,input().split())
gurahu = np.zeros((N,N))

for k in range(M):
    a,b,c = map(int,input().split())
    gurahu[a-1,b-1] = c
    gurahu[b-1,a-1] = c

gurahu = floyd_warshall(gurahu, directed=False)
gurahu = np.where((gurahu <= L) & (gurahu > 0), 1, 0)
gurahu = floyd_warshall(gurahu) - np.ones((N, N))

Q = int(input())

for k in range(Q):
    s,t = map(int,input().split())
    ans = gurahu[s-1,t-1]
    if ans == float('inf'):
        print(-1)
    else:
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
import numpy as numpy
from scipy.sparse.csgraph import floyd_warshall

N,M,L = map(int,input().split())
gurahu = np.zeros(N,N)

for k in range(M):
    a,b,c = map(int,input().split())
    gurahu[a-1][b-1] = c
    gurahu[b-1][a-1] = c

gurahu = floyd_warshall(gurahu, directed=False)
for s in range(N):
    for t in range(N):
        if gurahu[s][t] <= L:
            gurahu[s][t] = 0
        else:
            gurahu[s][t] = 1
gurahu = floyd_warshall(gurahu)

Q = int(input())

for k in range(Q):
    s,t = map(int,input().split())
    print(gurahu[s-1][t-1])

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import floyd_warshall

N,M,L = map(int,input().split())
gurahu = np.zeros((N,N))

for k in range(M):
    a,b,c = map(int,input().split())
    gurahu[a-1,b-1] = c
    gurahu[b-1,a-1] = c

gurahu = floyd_warshall(gurahu, directed=False)
gurahu = np.where((gurahu <= L) & (gurahu > 0), 1, 0)
gurahu = floyd_warshall(gurahu) - np.ones((N, N))

Q = int(input())

for k in range(Q):
    s,t = map(int,input().split())
    ans = gurahu[s-1,t-1]
    if ans == float('inf'):
        print(-1)
    else:
        print(int(ans))
Buggy python submission (verdict: Runtime Error):
n = int(input())
graph = [[]for i in range(n)]
for i in range(n-1):
    pre = list(map(int,input().split()))
    graph[pre[0]-1].extend([pre[1]-1,pre[2]])
    graph[pre[1]-1].extend([pre[0]-1,pre[2]])
seen = [0 for i in range(n)]
color = [-1 for i in range(n)]

def DFS(x):
    if seen[x] == 1:
        return 0
    else:
        pass
    seen[x] = 1
    for i in range(len((graph[x]))//2):
        if graph[x][2*i+1] % 2 == 0:
            color[graph[x][2*i]] = color[x]
        else:
            color[graph[x][2*i]] = not color[x]

    for i in range(len((graph[x]))//2):
        DFS(graph[x][2*i])

color[0] = True
DFS(0)
for i in range(n):
    print(int(color[i]))

Fixed submission:
import sys
sys.setrecursionlimit(10**9)
n = int(input())
graph = [[]for i in range(n)]
for i in range(n-1):
    pre = list(map(int,input().split()))
    graph[pre[0]-1].extend([pre[1]-1,pre[2]])
    graph[pre[1]-1].extend([pre[0]-1,pre[2]])
seen = [0 for i in range(n)]
color = [-1 for i in range(n)]

def DFS(x):
    if seen[x] == 1:
        return 0
    else:
        pass
    seen[x] = 1
    for i in range(len((graph[x]))//2):
        if graph[x][2*i+1] % 2 == 0:
            color[graph[x][2*i]] = color[x]
        else:
            color[graph[x][2*i]] = not color[x]

    for i in range(len((graph[x]))//2):
        DFS(graph[x][2*i])

color[0] = True
DFS(0)
for i in range(n):
    print(int(color[i]))
Buggy python submission (verdict: Runtime Error):
N = input()
col = N / 2
if col == 0:
  print(col)
else:
  col += 1
  print(col)

Fixed submission:
import math
N = int(input())
col = math.floor(N / 2)
judge = N % 2
if judge ==0:
  print(col)
else:
  col += 1
  print(col)
Buggy python submission (verdict: Runtime Error):
import math
inp = input().split()
N = int(inp[0])
K = int(inp[1])
S = 0
while N > 0:
	N = math.floor(N / K)
	S += 1

print(S)

Fixed submission:
inp = input().split()
N = int(inp[0])
R = int(inp[1])
#print(N)
if N >= 10:
  print(R)
else:
  col = R + 100*(10-N)
  print(col)
Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Fixed submission:
X,A = map(int, input().split())
if X < A:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
print(accumL.index(False))

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) for x in range(len(L)+1)]
TF = [i <= X for i in accumL]
print(TF.index(False))

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) for x in range(len(L)+1)]
TF = [i < X for i in accumL]
print(str(TF.index(False)+ 1))

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) for x in range(len(L)+1)]
TF = [i < X for i in accumL]
print(TF.index(False) + 1)

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) for x in range(len(L)+1)]
TF = [i < X for i in accumL]
print(TF.index(False))

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))

Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
L = [map(int,input().split())]
accumL = []
for n in range(len(L)):
  accumL.append(sum(L[:n+1])
s = [x < 4 for x in accumL]
print(str(s.index(False) + 1))

Fixed submission:
N,X = map(int, input().split())
L = [x for x in map(int, input().split())]
accumL = [sum(L[:x]) <= X for x in range(len(L)+1)]
if accumL[-1] == True:
  print(N + 1)
else:
  print(accumL.index(False))