Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,X = map(int, input().split())
D=0
L=list(map(int, input().split()))
i=1
while ((D<=X)and(i!=N)):
  D+=L[i-1]
  i+=1
print(i)
  
  

Failing test case input:
0 10
15 -1 2 1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N,X = map(int, input().split())
D=0
L=list(map(int, input().split()))
i=0
while (D<=X)and(i<N+1):
  if (i<N):
    D+=L[i]
  i+=1

 
print(i)

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, X = map(int, input().split())

Ls = list(map(int, input().split()))

d = 0
if d > X:
    print(0)
    exit()
for idx, l in enumerate(Ls):
    if d > X:
        print(idx)
        exit()
    d += l

print(len(Ls))


Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())

Ls = list(map(int, input().split()))

d = 0
for idx, l in enumerate(Ls):
    d += l
    if d > X:
        print(idx+1)
        exit()

print(N+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, lim = map(int, input().split())
l = list(map(int, input().split()))

s = 0
c = 0
for i in l:
  if (s > lim):
    break
  s += i
  c += 1

print(c)


Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N, lim = map(int, input().split())
l = list(map(int, input().split()))

s = 0
c = 1
for i in l:
  s += i
  if (s > lim):
    break
  c += 1

print(c)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 1

for i in range(N):
    if sum(L[0:i - 1]) <= X:
        D += 1

print(D)


Failing test case input:
1 9
7 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
ans = 1

for i in L:
    D = D + i
    if D > X:
        break
    else:
        ans += 1

print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



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

L = list(map(int,input().split()))

D = 0
count = 0
for i in range(N):
    ND = D + L[i]
    count += 1
    if ND > X:
        break
    D = ND
print(count)

Failing test case input:
0 12
51 9 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):



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

L = list(map(int,input().split()))

D = 0
count = 1
for i in range(N):
    ND = D + L[i]
    if ND > X:
        break
    count += 1
    D = ND
print(count)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=map(int, input().split())
L=list(map(int, input().split()))
count = 0
x=0

while x <= X and count < N:
  x = x + L[count]
  count = count + 1
print(count)

Failing test case input:
1 14
7 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N,X=map(int, input().split())
L=list(map(int, input().split()))
L.append(0)


d = 0
count = 0



for i in range(1, N+2):
  if d <= X:
    count = count + 1
    d = d + L[i-1]

print(count)