Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while (d <= x) and (j <= len(l)):
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while (d <= x) and (j <= range(len(l))):
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while (d <= x) and (j < range(l)):
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while d <= x:
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x =i[1]

d = 0
count = 0
j = 0
while d <= x:
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
n = i[0]
x =i[1]

d = 0
count = 0
j = 2

while i[j] < x:
  count =+ 1
  d = d + i[j]
  j =+ 1
  
  
print(count)

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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
N,　M = input().strip().split()
N,　M = [int(N),int(M)]

array = list(map(int, input().strip().split()))

sum = []

sum.append(array(0))

i = 1

while i < len(array):
	sum[i] = sum[i-1] + a[i]
  
j = 0

count = 0

while sum[j] <= M:
  	count =+ 1
    j =+ 1
    
print(count)
  	

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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)

Buggy python submission (verdict: Runtime Error):
N,M = input().strip().split()
N,M = [int(N),int(M)]
array = list(map(int, input().strip().split()))

sum = [array[0]]

i = 1

while i < len(array):
	sum[i] = sum[i-1] + a[i]
  
j = 0

count = 0

while sum[j] <= M:
  	count =+ 1
    j =+ 1
    
print(count)
  	

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

d = 0
count = 0

for i in range(len(l)):
  if d <= x:
  	d = d + l[i]
  	count = count + 1
  
if d <= x:
  count += 1
  
print(count)