Buggy python submission (verdict: Runtime Error):
N, X = list(int, input().split()[:2])
L = map(int, input().split())
D = 0
count = 0
for l in L:
  if D <= X:
      count += 1
  D += l
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, X = list(int, input().split()))[:2]
L = map(int, input().split())
D = 0
count = 0
for l in L:
  if D <= X:
      count += 1
  D += l
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, X = map(lambda x: int(x), input().split())[:2]
L = map(lambda x: int(x), input().split())
D = 0
count = 0
for l in L:
  if D <= X:
      count += 1
  D += l
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, X = map(lambda x: int(x), input().split())[:2]
L = map(lambda x: int(x), input().split())
D = 0
count = 0
for l in L:
  if D <= X:
      count += 1
  D += int(l)
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, X = map(lambda x: int(x), input().split())[:2]
L = map(lambda x: int(x), input().split())
D = 0
count = 0
for i, l in enumerate(L):
if D <= X:
    count += 1
D += int(l)
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, X = map(lambda x: int(x), input().split())
L = map(lambda x: int(x), input().split())
D = 0
count = 0
for i, l in enumerate(L):
if D <= X:
    count += 1
D += int(l)
print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

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

if __name__ == '__main__':
  N, X = map(input().split(), lambda x: int(x))
  L = map(input().split(), lambda x: int(x))
  D = 0
  count = 0
  for i, l in enumerate(L):
    if D <= X:
      count += 1
    D += l
  print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

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

if __name__ == '__main__':
  N = 0
  X = 0
  L = []
  for i, line in enumerate(sys.stdin):
    if i == 2:
      break
    line = line.split()
    if i == 0:
      N = line[0]
      X = line[1]
    if i == 1:
      L = line
  D = 0
  count = 0
  for l in L:
    if D < X:
      count += 1
    D += int(l)
  print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)

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

if __name__ == '__main__':
  N = 0
  X = 0
  L = []
  for i, line in enumerate(sys.stdin):
    if i == 2:
      break
    line = line.split()
    if i == 0:
      N = line[0]
      X = line[1]
    if i == 1:
      L = line
  D = 0
  count = 0
  for l in L:
    if D < X:
      count += 1
    D += int(l)
  print(count)

Fixed submission:
N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)