Problem:


Score : 200 points

Problem Statement

A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.

How many times will the ball make a bounce where the coordinate is at most X?

Constraints

1 \leq N \leq 100

1 \leq L_i \leq 100

1 \leq X \leq 10000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N X
L_1 L_2 ... L_{N-1} L_N

Output

Print the number of times the ball will make a bounce where the coordinate is at most X.

Sample Input 1

3 6
3 4 5

Sample Output 1

2

The ball will make a bounce at the coordinates 0, 3, 7 and 12, among which two are less than or equal to 6.

Sample Input 2

4 9
3 3 3 3

Sample Output 2

4

The ball will make a bounce at the coordinates 0, 3, 6, 9 and 12, among which four are less than or equal to 9.



Sample input:
3 6
3 4 5


Sample output:
2

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l_array = [int(x) for x in input().split()]
d = 0
cnt = 0
while d <= x:
  d = d+l_array[d]
  cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l =list(map(int, input().split()))
d = [0]
for i in range(n+1):
    d.append(d[i]+l[i])
ans = 0
for i in range(n+1):
    if d[i] <= x:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = [list(map(int,input().split())) for l in range(2)]
N=a[0][0]
X=a[0][1]
L=a[1]
count=0
D=0
while D<=X and count<=N+1:
    D=D+L[count]
    count=count+1

print(count)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=[int(x)for x in input().split()]

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

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=[int(x)for x in input().split()]

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

print(count)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
count = 1
for i in L
  D += i
  if X < D:
    break
  count += 1
print(count)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
count = 1
for i in L
  D = D + i
  if X < D:
    break
  count += 1
print(count)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split())
di = 0
for i in range(N):
  if di < X:
    di += L[i]
  else:
    print(i)
    break

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

c = 0
zahyo = 0
for i in range(100000):
  c += 1
  zahyo += L[i]
  
  if zahyo > X:
    break
    
print(c)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
*l, = map(int, input().split())

d = 0
ans = 0
for i in range(n+1):
    if x < d:
        break
    d += l[i]
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))

cd = 0
for i in range(n):
    cd += l[i]
    if cd > x:
        ans = i + 1
        break

print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map(int,input().split()))

D = [0] * (N + 1)

counter = 0

for i in range(1,len(L)):
	D[i] = D[i - 1] + L[i - 1]
	print(D)
	
	
for i in range(0,len(D)):
	if D[i] <= X:
	counter += 1
	
print(counter)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 

a=0
for i in range(N):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 

a=0
for i in range(N+1):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)

Submission status: Runtime Error

Solution code:
# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
boundCnt = i[0]
limit = i[1]

# 入力の取得(2行目。数値)
landpoints = list(map(int, input().split()))

nowCnt = 0
nowLandpoints = 0
for i in range(boundCnt + 1):
    if nowLandpoints > limit:
        break
    nowCnt += 1
    nowLandpoints += landpoints[i]

print(nowCnt)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))
suml=0
i=0
while x>=suml:
   suml+=l[i]
   i+=1
print(i)

Submission status: Runtime Error

Solution code:
s,x=(int(y) for y in input().split())
l=list(map(int, input().split()))
a=0
c=0
for y in range(s+1):
	if x>=c:
		a+=1
		c+=l[y]
	else:
		break
print(a)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int,input().split()))
pos = 0
count = 0
i=0
while pos <= x and i <= n:
    pos += l[i]
    count += 1
    i += 1
print(count)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
bound = 1
D = 0
i = 0
while X >= D + L[i] and i < N:
    bound += 1
    D = D + L[i]
    i += 1
print(bound)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
bound = 0
D = 0
i = 0
while D =< X and i < N:
    bound += 1
    D = D + L[i]
    i += 1
print(bound)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
    d=d+1
    if X>=d:
      count +=1
      
print(count)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
 d=d+1
  if X>=d:
  count +=1
print(count)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
 d=d+1
 if X>=d:
  count +=1
print(count)

Submission status: Runtime Error

Solution code:
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
D=0
for i in range(1,N+2):
    D+=L[i-1]
    if D>X:
        break
    else:
        pass
print(i)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 0
now = 0
for i in range(n + 1):
  if now > x:
    break
  cnt += 1
  now = now + l[i]
print(cnt)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

x = 0
i = 0

while x <= X :
    x += L[i]
    i += 1
    
print(i)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))

ans=0
d=0

for i in range(n):
    d+=l[i]
    ans+=1
    if(d>x):
        break

if(i=n-1):
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())

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

ans=0
d=0

for i in range(n+1):
    d+=l[i]
    ans+=1
    if(d>x):
        break
        
print(ans)

Submission status: Runtime Error

Solution code:
import sys

n,x = map(int,input().split())
n = n+1

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


counter = 0
next_jump = 0
for val in range(1,n+1):
    if next_jump <= x:
        next_jump = next_jump + l_L[val-1]
        counter += 1
    else:
        print(counter)
        sys.exit(0)
print(counter)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

i = 0
D = 0

if L[0] > X:
    print(1)
    exit()
elif L[0] == X:
    print(2)
    exit()

while D <= X and i <= N:
    D += L[i]
    i += 1

print(i)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

i = 0
D = 0

if L[0] > X:
    print(1)
    exit()

while D <= X and i <= N:
    D += L[i]
    i += 1

print(i)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
i = 1
while D <= X:
    D += L[i-1]
    i += 1
print(i-1)

Submission status: Runtime Error

Solution code:
n, x = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

d = 0
count = 0
for i in l:
    if d > x:
        break
    count += 1
    d += i

print(count

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))

d = []
d[0] = 0
count = 1
for i in range(1,n):
    d[i] = d[i-1] + l[i-1]
    if x >= d[i]:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
# n, x = 3, 6
# l = [3, 4, 5]
d = 0
i = 0
for i in range(1, n + 2):
    d = d + l[i - 1]
    if d > x:
        break
print(i)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
# n, x = 3, 6
# l = [3, 4, 5]
d = 0
for i in range(1, n + 2):
    d = d + l[i - 1]
    if d > x:
        break
print(i)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int,input().split()))
cnt = 0
for i in range(n+1):
    cnt += l[i]
    if cnt > x:
        break
print(i + 1)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))

L=0
for i in range(n+1):
    L += l[i]
    if L > x:
        print(i+1)
        exit()

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
L=list(map(int,input().split()))
count=0
high=0
for i in range(n+1):
  if high>x:
    break
  else:
    count+=1
    if i<n+1:
        high+=L[i]

print(count)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
L=list(map(int,input().split()))
count=0
high=0
for i in range(n+1):
  if high>x:
    break
  else:
    count+=1
    high+=L[i]
print(count)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N)+1
position = 0
count = 0
while position < x:
    position += L[count]
    count += 1
    if n == count:
        break
if n > count:
    print(count)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N)+1
position = 0
count = 0
if n > count:
    while position < x:
        position += L[count]
        count += 1
    print(count)
else:
    print(n)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(500000)

N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N) + 1
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
if n > count:
    print(count)
else:
    print(n)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N) + 1
position = 0
count = 0
while position < x:
    position += L[count]
    count += 1
if n > count:
    print(count)
else:
    print(n)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N) + 1
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
if n > count:
    print(count)
else:
    print(n)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N)
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
if n+1 > count:
    print(count)
else:
    print(n+1)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N)
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
if n+1 < count:
    print(count)
else:
    print(n+1)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
N,X = (input().split())
L = list(map(int, input().split()))
x = int(X)
position = 0
count = 0
while position < x:
    position += L[count]
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
n,x= map(int,input().split())
L = list(map(int,input().split()))


coordinate=0
for i in range(len(L)):
    coordinate+=L[i]
    if coordinate>x or i==len(L):
        ans = i+1
        break
    
print(ans)

Submission status: Runtime Error

Solution code:
n,x= map(int,input().split())
L = list(map(int,input().split()))


coordinate=0
for i in range(len(L)):
    coordinate+=L[i]
    if coordinate>x:
        ans = i+1
        break
    
print(ans)

Submission status: Runtime Error

Solution code:
n,x= map(int,input().split())
L = list(map(int,input().split()))


coordinate=0
i=0
while(coordinate<=x):
    coordinate+=L[i]
    i+=1

print(i)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int,iput().split()))
cnt = 1
dis = 0
for i in range(n):
  dis += l[i]
  if dis > x:
    break
  cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
ans=0
cnt=0
while ans<=X:
    ans+=L[cnt]
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
x=0
time=0
for i in range(N+1):
  if x<=X:
    time+=1
  if i<N:
    count+=1
print(time)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
x=0
time=0
while x<=X:
    x+=L[time]
    time+=1
print(time)

Submission status: Runtime Error

Solution code:
mport sys

def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 1
    D = 0
    for a in A:
        D += a
        if D > X:
            break
        cnt += 1

    return cnt

if __name__ == '__main__':
    print(main())

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
c = 0
for i in L:
  if L <= X:
    c = c + 1
  elif L > X:
    print(c)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
d = 0
count = 0
while d <= a[1]:
  count += 1
  d += b[count]
print(count)

Submission status: Runtime Error

Solution code:
n,x=map(int, input().split())
L=list(map(int, input().split()))

i=0
D=0
while(i<=n and D<=x):
    D+=L[i]
    i+=1
print(i)

Submission status: Runtime Error

Solution code:
n,x=map(int, input().split())
L=list(map(int, input().split()))

i=0
D=0
while(i<=n+1 and D<=x):
    D+=L[i]
    i+=1
print(i)

Submission status: Runtime Error

Solution code:
n,m = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

num = 0
ct = 0
while num <= m and ct <= len(l):
    ct +=1
    num += l[ct-1]
    
print(ct)

Submission status: Runtime Error

Solution code:
n,m = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

num = 0
ct = 0
while num <= m:
    ct +=1
    num += l[ct-1]
    
print(ct)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L_list = list(map(int, input().split()))
D = 0
ans = 0
for i in range(N+1):
    if D > X:
        break
    else:
        D += L_list[i]
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
# B - Bounding
N, X = map(int,input().split())
L = list(map(int, input().split()))
D = 0
count = 0

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

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
i = 0
while D <= X:
    D = (D + L[i])
    i += 1
print(i)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
c = 0

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
i = 0
while S[i] <= X:
  if S[i]<= X:
    c += 1
    i += 1

    
print(c)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
c = 0

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
i = 0
while S[i] <= X:
  if S[i]<= X:
    c += 1
    i += 1
  else:
    print(c)
    
print(c)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]

i = 0
while i <= N:
  S.append(S[i-1]+L[i])
  i += 1
  
print(S)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**6)
m = list(map(int, input().split()))
n = m[0]
x = m[1]
l = list(map(int, input().split()))
ans = 0;
for i in range(n+1):
    if(ans > x):
        print(i)
        break
    elif(i == n+1):
        print(n+1)
        break
    ans +=l[i]

Submission status: Runtime Error

Solution code:
m = list(map(int, input().split()))
n = m[0]
x = m[1]
l = list(map(int, input().split()))
ans = 0;
for i in range(n+1):
    if(ans > x):
        print(i)
        break
    elif(i == n+1):
        print(n+1)
        break
    ans +=l[i]

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-


from sys import stdin
import itertools


############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N+1):
    data.append(int(write[i]))
    
count = 0
dis = 0

for d in data:
    if dis <= X:
        count += 1
        dis += d
    else:
        break

print(count)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))

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

Submission status: Runtime Error

Solution code:
n,x=input().split()
L = list(input().split())
d = 0
i = 0
while d <= int(x) and i<int(n):
    d+=int(L[i])
    i+=1
if d > x:
    print(i)
else:
    print(i+1)

Submission status: Runtime Error

Solution code:
n,x=input().split()
L = list(input().split())
d = 0
i = 0
while d <= int(x):
    d+=int(L[i])
    i+=1
print(i)

Submission status: Runtime Error

Solution code:
N, X = map(int,input().split())
L = list(map(int,input().split()))
ans = 1
D = L[0]
while D<=X and ans<N+1:
    D+=L[ans]
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
N, X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
ans = 0
while D<=X and ans<N+1:
    D+=L[ans]
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(N) if sum(L[:x])<=X]
if n>=len(s):
  print(len(s))
else:
  print(N+1)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
bound=1
D=0
for i in range(N+1):
  D+=L[i]
  if D<=X:
    bound+=1
  else:
    pass
print(bound)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
bound=1
D=0
for i in range(N+1):
  D+=L[i]
  if D<=X:
    bound+=1
  else:
    break;
print(bound)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
bound=1
D=0
for i in range(N+1):
  D+=L[i]
  if D<=X:
    bound+=1
  else:
    break
print(bound)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 0
i = 0
while d <= x:
    cnt += 1
    d += l[i]
    i += 1
print(cnt)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = [0]
for i in range(1, n+2):
    d.append(d[i-1] + l[i-1])
    if d[i] > x :
        print(len(d)-1)
        exit()

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = 0
for i in range(1, N + 2):
    d += L[i - 1]
    if d > X:
        print(i)
        exit()

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int,input().split()))

i = 0
D = 0
while D <= X and i <= N:
    D += L[i]
    i += 1
print(i)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0
i = 0
while D<=X:
  if X<D:
    break
  D += L[i-1]
  i += 1
print(i)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map(int,input().split()))

i = 0
D = 0
while D<=X:
  D += L[i]
  i += 1
print(i)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))
L=[0]+L
 
l=int(0)
counter=int(0)
while l+L[counter]<=X and counter<N+1:
  l+=L[counter]
  counter+=int(1)
  
print(counter)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))
 
l=int(0)
counter=int(0)
while l<=X and counter<=N+1:
  l+=L[counter]
  counter+=int(1)
  
print(counter)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))
 
l=int(0)
counter=int(0)
while l<=X:
  l+=L[counter]
  counter+=int(1)
  
print(counter)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))

l=0
counter=0
while l<=X:
  l+=L[counter]
  counter+=1
  
print(counter)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))

length=0
counter=0
while l<=X:
  length+=L[counter]
  counter+=1
  
print(counter)

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))

length=0
counter=0
while l<=X:
  length+=L[counter]
  counter+=1

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))

l=0
counter=0
while l<=X:
  l+=L[counter]
  counter+=1

Submission status: Runtime Error

Solution code:
N, X=map(int, input().split())
L=list(map(int, input().split()))

l=0
counter=0
while l<=X:
  l+=L[counter-1]
  counter+=1

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D +=l[i]
  if D <= x:
    c += 1
print(c)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
print(c)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  else:
    li.append(D)
    
if max(li) > x:
  print(n+1)
else:
  print(c)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  li.append(D)
if max(li) > x:
  print(n+1)
else:
  print(c)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  else:
    break
print(c)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  elif:
    break
print(c)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
L = list(map(int, input().split()))
d = 0
bound = 1
for l in L:
	d += l
	if d > X:
		break
	bound += 1
print(bound)

Submission status: Runtime Error

Solution code:
import sys
n, x = map(int, sys.stdin.readline().split())
llist = list(map(int, sys.stdin.readline().split()))

d = 0
ans = 0
while d <= x:
  ans += 1
  d += llist[ans-1]
  if ans >= n+1:
    print(n+1)
    exit()
print(ans)

Submission status: Runtime Error

Solution code:
import sys
n, x = map(int, sys.stdin.readline().split())
llist = list(map(int, sys.stdin.readline().split()))

d = 0
ans = 0
while d <= x:
  ans += 1
  d += llist[ans-1]
print(ans)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 0

while d <= x:
    d = d + l[cnt]
    cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans,d=0,0

while d<=x:
  ans+=1
  d+=l[ans-1]
print(ans)

Submission status: Runtime Error

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n,x=na()
l=na()

count=0
pos=0
for i in range(n+1):
    count+=1
    pos+=l[i]
    if pos>x:
        break
print(count)

Submission status: Runtime Error

Solution code:
#B - Bounding(ABC130)
A=list(map(int, input().split()))
L=list(map(int, input().split()))
D=0
C=1
for i in L:
    D+=i
    if D<=A[1]:
        C+=1
    else:
        print(C)
        break
else:
    print(N)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())

d = 0
for i, l in enumerate(input().split()):
  d += int(l)
  if d > x:
    print(i + 1)
    break
else:
  prin(n + 1)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())

d = 0
for i, l in enumerate(input().split()):
  d += int(l)
  if d > x:
    print(i)
    break
else:
  prin(n)

Submission status: Runtime Error

Solution code:
N, X = [int(x) for x in input().split()]
LN = [int(x) for x in input().split()]
p = 0
c = 1
while True:
  if p + LN[c-1] <= X:
    p += LN[c-1]
    c += 1
  else:
    break
print(c)

Submission status: Runtime Error

Solution code:
n, x = (int(i) for i in input().split())
l = [int(i) for i in input().split()]

d = 0
ans = 0
i = 0
while d <= x and i < n+1:
    ans += 1
    d = d + l[i]
    i += 1

print(ans)

Submission status: Runtime Error

Solution code:
n, x = (int(i) for i in input().split())
l = [int(i) for i in input().split()]

d = 0
ans = 0
i = 0
while d <= x:
    ans += 1
    d = d + l[i]
    i += 1

print(ans)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
if n != 1:
  l = list(map(int,input().split()))
  i = 0
  cnt = 0
  ans = 0
  while cnt <= x:
    ans += 1
    cnt += l[i]
    i += 1
  print(ans)
else:
  l = int(input())
  if l <= x:
    print(2)
  else:
    print(1)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
if n > 2:
  l = list(map(int,input().split()))
  i = 0
  cnt = 0
  ans = 0
  while cnt <= x:
    ans += 1
    cnt += l[i]
    i += 1
  print(ans)
else:
  l = int(input())
  if l <= x:
    print(2)
  else:
    print(1)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
i = 0
cnt = 0
ans = 0
while cnt <= x:
  ans += 1
  cnt += l[i]
  i += 1
print(ans)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0

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

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    A = int(input().split())
    if D <=X:
        D+=A
        ans+=1
    else:
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    A = int(input())
    if D <=X:
        D+=A
        ans+=1
    else:
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    if D <=X:
        D+=int(input())
        ans+=1
    else:
        A =input()
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    if D <=X:
        D+=int(input())
        ans+=1
    else:
        A =input())
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    if D <=X:
        D+=int(input())
        ans+=1
    else:
        int(input())
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    if D <=X:
        D+=int(input())
        ans+=1
    else:
        continue
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
while D <=X:
    D += int(input())
    ans+= 1
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
D = 0
ans = 1
while D <=X:
    D += int(input())
    ans+= 1
if D >X:
    ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = [x for x in map(int, input().split())]

D, count = 0, 0
while D<=X:
    D = D+L[count]
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map(input().split()))

cnt=1
dist=0

for l in L:
  cnt+=1
  dist+=l
  if dist>=X:
    break
    
print(cnt)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split())
L = list(map,input().split())

cnt=1
dist=0

for l in L:
  cnt+=1
  dist+=l
  if dist>=X:
    break
    
print(cnt)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=[int(input()) for _ in range(n)]

ans=0
a=0
for i in range(n):
  if a<=x:
    a+=l[0]
    ans+=1
        
print(ans)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=[int(input()) for _ in range(n)]

ans=0
a=0
for i in range(n):
  if i==0:
    ans+=1
    continue
  else:
    if a<=x:
      ans+=1
      a+=l[i-1]
    else:
      break

print(ans)

Submission status: Runtime Error

Solution code:
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
sum = 0
i = 0
count = 0
while (sum <= X):
    sum = sum + L[i]
    i = i + 1
    count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=0
pop=0
i=0
while(pop<=x or i<n):
    pop+=l[i]
    ans+=1
    i+=1
print(ans)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=0
pop=0
i=0
while(pop<=x):
    pop+=l[i]
    i+=1
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = list(map(int, input().split()))

d = 0
k = 1
for i in range(N+1):
    d += L[i]
    if d <= X:
        k += 1
    else:
        break
print(k)

Submission status: Runtime Error

Solution code:
n, x = map(int,input().split())
L = list(map(int,input().split()))
d, cnt = 0, 1
for i in range(1,n+2):
  d = d + L[i-1]
  if d <= x:
    cnt+=1
  else:
    break
print(cnt)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = [int(i) for i in input().split()]

i = 1
d = 0
c = 1
while True:
    d += l[i-1]
    if d > x or i == n + 1:
        break
    c += 1
    i += 1
    
print(c)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = [int(i) for i in input().split()]

i = 0
d = 0
c = 0
while d <= x:
    c += 1
    d += l[i-1]
    i += 1
    
print(c)