Problem p03000 (python)

Fixed submission:
N , X = map(int,input().split())
L=list(map(int,input().split()))
b = 0
cnt = 1
for i in range(N):
    b += L[i]
    if b <= X   :
        cnt+=1
    else:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
x = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        x + = (int(L[i*2]))
        cnt += 1
    else :
        break
    if x+lst[i+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
x = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        x + = (int(L[i*2]))
        cnt += 1
    else :
        break
    if x+lst[i+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
x = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
print(lst)
for j in range (N):
    x += lst[j]
    cnt += 1

    if x+lst[j+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
x = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N):
    x += lst[j]
    cnt += 1
    if x+lst[j+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
x = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
print(lst)
for j in range (N):
    x += lst[j]
    cnt += 1

    if x+lst[j+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
b = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N):
    b += lst[j]
    cnt += 1

    if b+lst[j+1] > X :
        break
    if cnt >= N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
b = 0
lst = list()
for i in range(N):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N):
    b += lst[j]
    cnt += 1

    if b+lst[j+1] > X :
        break
    if cnt == N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
b = 0
lst = list()
for i in range(N + 1):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N + 1):
    b += lst[j]
    cnt += 1
    if b+lst[j+1] > X :
        break
    if cnt == N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
b = 0
lst = list()
for i in range(N + 1):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N + 1):
    print(b)
    b += lst[j]
    cnt += 1
    if b+lst[j+1] > X :
        break
    if cnt == N:
        break
print(cnt)

Buggy submission (verdict: Runtime Error):
N , X = map(int,input().split())
L = list(input())
cnt = 1
b = 0
lst = list()
for i in range(N + 1):
    if int(len(L) / 2) + 1 > i   :
        lst.append(int(L[i*2]))
    else :
        break
for j in range (N + 1):
    b += lst[j]
    cnt += 1
    if b+lst[j+1] > X :
        break
    if cnt == N:
        break
print(cnt)