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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

huga = list(map(int, input().split()))
N=huga[0]
X=huga[1]
huga = list(map(int, input().split()))

d=0
for i in range(N):
  d=d+huga[i]
  if d>=X:
    print(i+1)
    sys.exit()

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

huga = list(map(int, input().split()))
N=huga[0]
X=huga[1]
huga = list(map(int, input().split()))

d=0
for i in range(N):
  d=d+huga[i]
  if d>X:
    print(i+1)
    sys.exit()

Submission status: Wrong Answer

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

pos = 0
for i in range(n):
  pos += l_list[i]
  if pos <= x:
    continue
  else:
    break
print(str(i + 1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

pos = 0
for i in range(n):
  if pos > x:
    break
  pos += l_list[i]
print(str(i))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_input1 = input()
_input2 = input()
N, X = tuple([int(a) for a in _input1.split(' ')])
l_list = [int(a) for a in _input2.split(' ')]

length = 0
cnt = 0

for l in l_list:
    if length > X:
        break
    length += l
    cnt += 1

if length > X:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
_input1 = input()
_input2 = input()
N, X = tuple([int(a) for a in _input1.split(' ')])
l_list = [int(a) for a in _input2.split(' ')]

length = 0
cnt = 0

for l in l_list:
    if length > X:
        break
    length += l
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

d = 0
count = 1
while len(L) > 0:
    d += L.pop()
    if d <= X:
        count += 1
    else:
        break

print(count)

Submission status: Wrong Answer

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

d = 0
count = 0
while d <= X and len(L) > 0:
    count += 1
    d += L.pop()

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
il_1 = input()
il_2 = input()

list_1 = [int(x) for x in il_1.split(' ')] # N と　X
list_2 = [int(x) for x in il_2.split(' ')]

sum_list = []
for i in list_2:
    if sum(sum_list) < list_1[1]:
      sum_list.append(i)
    elif sum(sum_list) == list_1[1]:
      print(len(sum_list) + 1)
      break
    elif sum(sum_list) > list_1[1]:
      print(len(sum_list))
      break

Submission status: Wrong Answer

Solution code:
il_1 = input()
il_2 = input()

list_1 = [int(x) for x in il_1.split(' ')] # N と　X
list_2 = [int(x) for x in il_2.split(' ')]

sum_list = []
for i in list_2:
    if sum(sum_list) < list_1[1]:
      sum_list.append(i)
    else:
      sum_list.append(i)
      print(len(sum_list))
      break

Submission status: Wrong Answer

Solution code:
il_1 = input()
il_2 = input()

list_1 = [int(x) for x in il_1.split(' ')] # N と　X
list_2 = [int(x) for x in il_2.split(' ')]

sum_list = []
for i in list_2:
    if sum(sum_list) < list_1[0]:
      sum_list.append(i)
    else:
      sum_list.append(i)
      print(len(sum_list))
      break

Submission status: Wrong Answer

Solution code:
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i+1
    else:
      return i+2
y = makey(x1,x2)
print(y)

Submission status: Wrong Answer

Solution code:
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i+1
    return i
y = makey(x1,x2)
print(y)

Submission status: Wrong Answer

Solution code:
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i
  return i
y = makey(x1,x2)
print(y+1)

Submission status: Wrong Answer

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

l = list(map(int, input().split()))
al = [0] * (n + 1)

count = 0
for i in range(0, n):
    al[i + 1] = al[i] + l[i]

al.remove(0)
for e in al:
    if e <= x:
        count += 1
    else:
        break

print(count)

Submission status: Wrong Answer

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

l = list(map(int, input().split()))
al = [0]*(n+1)

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

Submission status: Wrong Answer

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

l = list(map(int, input().split()))
al = [0]

count = 0
for i in range(1,n):
    t = al[i-1]+l[i-1]
    if t <=x:
        al.append(t)
    else:
        break
print(len(al))

Submission status: Wrong Answer

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

leap = 0
dem = 0
for i in l:
  if leap > x:
    break
  else:
    dem+=1
    leap+=i
print(dem)

Submission status: Wrong Answer

Solution code:
factor_1, factor_2 = list(map(int, input().split()))

L = [i for i in input().split()]

print(L)

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	if(D_pre <= factor_2):
		count += 1

print(count)

Submission status: Wrong Answer

Solution code:
factor_1, factor_2 = list(map(int, input().split()))

L = [s for s in input().split()]

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	print(D_pre)
	
	if(D_pre <= factor_2):
		count += 1

print(count)

Submission status: Wrong Answer

Solution code:
factor_1, factor_2 = list(map(int, input().split()))

L = [s for s in input().split()]

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	print(D_pre)
	
	if(D_pre <= factor_2):
		count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# print(n, x, l_list)
d = 0
i = 0
while d <= x:
    d += l_list[i]
    i += 1
    if i == len(l_list):
        break

print(i)

Submission status: Wrong Answer

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

# print(n, x, l_list)
d = 0
i = 0
while d <= x:
    d += l_list[i]
    i += 1
    if i == len(l_list) - 1:
        break

print(i)

Submission status: Wrong Answer

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

#数直線上をN+1回跳ねるボールがあり、1回目は座標D1=0, i回目は座標Di=D(i-1)+L(i-1) (1<=i<=N+1)で跳ねます
#数直線がX以下の領域でボールが跳ねる回数は何回でしょうか

#Given:
    #N X
    #L1, L2, L3, ... LN-1, LN


#N, Xを格納
#inputをsplit関数でlistに変換
i = input()
lis = i.split()
#listの要素をN, Xに格納
N = int(lis[0])
#print("Nは"+str(N))
X = int(lis[1])
#print("Xは"+str(X))

#L1, L2, L3, ... LN-1, LNを格納
#inputをsplit関数でlistに変換
i = input()
lis = i.split()
#lisをLに順に格納
L = list()
for k in lis:
    print(k)
    L.append(int(k)) #数値に変換
#print(L)

#NとLの数を確認
if N != len(L):
    print("跳ねる回数と跳ねる位置のリスト数が一致していません。")
    sys.exit()

#D1, D2, D3 ... DN-1, DNを生成
D = list()

#D0 = 0
D.append(0)
for k in range(0,len(L)):
    D.append(D[k]+L[k]) #D0～DN
#print(D)

#Dのうち、X以下の要素をcount
n = sum(test <= X for test in D)  # 真偽値リストを作って True の数を合計する方法

#戻り値n
print(n)

Submission status: Wrong Answer

Solution code:
n, x = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0
p = 0
for e in a:
  p += e
  if p > x:
    break
  ans += 1
print(ans)

Submission status: Wrong Answer

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

D = 0
count = 0

while D <= X:
  count += 1
  if count >= N:
    break
  else:
    D = D + L[count-1]

print(count)

Submission status: Wrong Answer

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

while D<=X:
    for i in range(N):
        D+=L[i]
        if D<=X:
            num+=1

print(num)

Submission status: Wrong Answer

Solution code:
n, x = list(map(int, input().split()))
a = list(filter(lambda e: int(e) <= x, input().split()))
print(len(a))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

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

print(D)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(n)

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc130/tasks/abc130_b

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

d = [0]
cnt = 0
for i in range(1,n):
    if d[i-1] + l[i-1]<= x:
        d.append(d[i-1] + l[i-1])
    else:
        break

print(len(d))

Submission status: Wrong Answer

Solution code:
n,x = map(int , input().split())
List = list(map(int,input().split()))
count=1
sum=0
for i in range(n):
  sum = sum+List[i]
  if x < sum:
    print(count)
    exit()
  else:
    count += 1

Submission status: Wrong Answer

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

D = 0
i = 0
ans = 1

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

bound = [0]
for i in range(N):
    bound += [L[i] + bound[-1]]
    print(bound)

print(bound)

counter = 0
for i in bound:
    if i <= X:
        counter += 1
    else:
        break
print(counter)

Submission status: Wrong Answer

Solution code:
N,X=list(map(int,input().strip().split(' ')))
L=list(map(int,input().strip().split(' ')))
index=0
Bounce=[0]
for i in range(len(L)):
    
        
    Bounce+=[L[i]+Bounce[-1]]
    
count=0
for x in Bounce:
    if x<X:
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N,X=list(map(int,input().strip().split(' ')))
L=list(map(int,input().strip().split(' ')))
index=0
temp=0
for i in range(len(L)):
    if temp>X:
        break
        
    temp+=L[i]
    index+=1
print(index)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
ans = 0
for i in l:
 d += i
 ans += 1
 if d >= x:
  print(ans)
  exit()
print(ans)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
ans = 0
for i in l:
 d += i
 ans += 1
 if d > x:
  print(ans)
  exit()
print(ans)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
d = 0
ans = 0
for i in l:
 d += i
 ans += 1
 if d > x:
  print(ans)
  exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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=D+L[i]
    if i+1<=N-1:
        i+=1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = 0
i = 0
count = 0
while d <= x and i < len(ls):
    count += 1
    d += ls[i]
    i += 1

print(count)

Submission status: Wrong Answer

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

d = 0
count = 0
while d <= x and count < len(ls):
    d += ls[count]
    count += 1

print(count)

Submission status: Wrong Answer

Solution code:
nx = map(int, raw_input().split())
l = map(int, raw_input().split())
 
n = nx[0]
x = nx[1]
 
d = 0
i = 1
 
while d <= x:
    d += l[i - 1]
    i += 1 
    if i == n + 1:
      break
print(i)

Submission status: Wrong Answer

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

for i, l in enumerate(L, 1):
    D += l
    if D > X:
        print(i)
        break
print(N+1)

Submission status: Wrong Answer

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

for i, l in enumerate(L, 1):
    D += l
    if D > X:
        print(i)
        break

Submission status: Wrong Answer

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

RES = []
ichi = 0
cnt = 1

for i in LIST:
    if ichi <= X:
        cnt = cnt + 1
        ichi = ichi + i

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nx = map(int, raw_input().split())
l = map(int, raw_input().split())
 
n = nx[0]
x = nx[1]
 
d = 0
i = 0
 
while d <= x:
    if i  == n :
      break
    d += l[i]
    i += 1 
print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

RES = []
ichi = 0
cnt = 0

for i in LIST:
    if ichi <= X:
        cnt = cnt + 1
        ichi = ichi + i

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, X = map(int, input().split()[:2])
L = map(int, input().split())
D = 0
count = 0
for i, l in enumerate(L):
  if D <= X:
      count += 1
  if i == N - 1:
      break
  D += l
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, X = map(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)

Submission status: Wrong Answer

Solution code:
N, X = list(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)

Submission status: Wrong Answer

Solution code:
N, X = list(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)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
  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)

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("POSSIBLE")
    elif q == 0:print("IMPOSSIBLE")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

#n = ip()                                     #入力整数1つ
x,y= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(m)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#a.pop(0)は10^5あるときTLEしやすい!注意!抜くなら逆ソート!

a = iprow()

dp = [0]
for i in range(1,x+1):
    dp.append(dp[i-1]+a[i-1])
s = 0
while dp[s] <= y and s<=x-1 :s+=1
if s == x:s+=1
print(s)

Submission status: Wrong Answer

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("POSSIBLE")
    elif q == 0:print("IMPOSSIBLE")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

#n = ip()                                     #入力整数1つ
x,y= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(m)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#a.pop(0)は10^5あるときTLEしやすい!注意!抜くなら逆ソート!

a = iprow()

dp = [0]
for i in range(1,x+1):
    dp.append(dp[i-1]+a[i-1])
s = 0
while dp[s] <= y and s<=x-1 :s+=1
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
l=[int(s) for s in input().split()]
re=[0]
cnt=0
for i in range(len(l)):
  re.append(re[i]+l[i])
  if re[i]<=k:
    cnt+=1
print(cnt)

Submission status: Wrong Answer

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

L=[n]

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

first=0
jump=0
for i in L:
    D=first+i
    first=D
    if(D>=x):
        jump+=1

print(jump)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,X = map(int,input().split(" "))
l_list = input().split()

count = 1
d = 0
for i in range(N):
        da = d + int(l_list[i])
        d = da
        if da <= X:
                count +=1
        else:
                print(count)
                break

Submission status: Wrong Answer

Solution code:
d_list = [0]
N,X = map(int,input().split(" "))
l_list = input().split()

count = 1
d = 0
for i in range(N):
        d_a = d + int(l_list[i])
        d = d_a
        if d_a <= X:
                count +=1
        else:
                print(count)

Submission status: Wrong Answer

Solution code:
d_list = [0]
N,X = input().split(" ")
l_list = input().split(" ")

for i in range(int(len(l_list))):
    num = int(d_list[i]) + int(l_list[i])
    d_list.append(num)
    

for i in range(int(len(d_list)-1)):
    if d_list[i]<=int(X)< d_list[i+1]:
        print(i+1)

Submission status: Wrong Answer

Solution code:
d_list = [0]
N,X = input().split(" ")
l_list = input().split(" ")

for i in range(int(len(l_list))):
    num = int(d_list[i]) + int(l_list[i])
    d_list.append(num)
    print(d_list)

for i in range(int(len(d_list)-1)):
    if d_list[i]<=int(X)< d_list[i+1]:
        print(i+1)

Submission status: Wrong Answer

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

ans=0

def d(i):
    if i==1:
        return 0
    else:
        return d(i-1)+L[i-2]

for i in range(1,N+2):
    if d(i)>X:
        print(i-1)
        exit()

Submission status: Wrong Answer

Solution code:
n,a=(int(x) for x in input().split(" "))
l = [int(x) for x in input().split(" ")]
k=1
j=0
for i in l:
    j = j+i 
    if j <= a:
        k = k+1
    else:
        print(k)
        exit

Submission status: Wrong Answer

Solution code:
n,a=(int(x) for x in input().split(" "))
l = [int(x) for x in input().split(" ")]
k=0
j=0
for i in l:
    j = j+i 
    if j <= a:
        k = k+1
    else:
        print(k)
        exit

Submission status: Wrong Answer

Solution code:
n,a=(int(x) for x in input().split(" "))
l = [int(x) for x in input().split(" ")]
k=0
j=0
for i in l:
    k = k+1
    j = j+i 
    if j > a:
       print(k)
       exit

Submission status: Wrong Answer

Solution code:
n,a=(int(x) for x in input().split(" "))
l = [int(x) for x in input().split(" ")]
k=0
j=0
for i in l:
    k = k+1
    j = j+i 
    if j > a:
       print(k)
       exit()

Submission status: Wrong Answer

Solution code:
n,a=(int(x) for x in input().split(" "))
l = [int(x) for x in input().split(" ")]
j=0
for i in l:
   j = j+i 
   if j > a:
       print(l.index(i)+1)
       exit()

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 0
for elem in input().split():
  if d == x:
    cnt += 1
    print(cnt)
    break
  elif d > x:
    print(cnt)
    break    
  else:
    d += int(elem)
    cnt += 1

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 1
for elem in input().split():
  if d == x:
    print(cnt)
    break
  elif d > x:
    print(cnt - 1)
    break    
  else:
    d += int(elem)
    cnt += 1

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 1
for elem in input().split():
  d += int(elem)
  if d == x:
    if x !=0:
      cnt += 1
    print(cnt)
    break
  elif d > x:
    print(cnt)
    break    
  else:
    cnt += 1

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 1
for elem in input().split():
  d += int(elem)
  if d == x:
    if d !=0:
      cnt += 1
    print(cnt)
    break
  elif d > x:
    print(cnt)
    break    
  else:
    cnt += 1

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 1
for elem in input().split():
  d += int(elem)
  if d == x:
    cnt += 1
    print(cnt)
    break
  elif d > x:
    print(cnt)
    break    
  else:
    cnt += 1

Submission status: Wrong Answer

Solution code:
n, x = [int(elem) for elem in input().split()]
d = 0
cnt = 1
for elem in input().split():
  d += int(elem)
  if d > x:
    print(cnt)
    break
  else:
    cnt += 1

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

N, X, = map(int, input().split())
L = [int(v) for v in input().split()]

t = 0
c = 0
for v in L:
    if t <= X:
        c += 1
        
    t += v
    
print(c)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
[n,x]=[int(_) for _ in input().split()]
li=[int(_) for _ in input().split()]
d=li[0]
a=1
while True:
  if a==n: break
  d+=li[a]
  if d>x: break
  a+=1
print(a)

Submission status: Wrong Answer

Solution code:
[n,x]=[int(_) for _ in input().split()]
li=[int(_) for _ in input().split()]
d=li[0]
a=1
while True:
  #d<=x and a<len(li):
  d+=li[a]
  a+=1
  if d>x or a==len(li): break
print(a)

Submission status: Wrong Answer

Solution code:
inp_1 = input().split()
n = int(inp_1[0])
x = int(inp_1[1])
l_in = input().split()

count = 1 # 初回
d = 0
for i in range(n):
    if d + int(l_in[i]) <= x:
        count = count+1
        d = d+int(l_in[i])
print(count)

Submission status: Wrong Answer

Solution code:
[n,x]=[int(_) for _ in input().split()]
li=[int(_) for _ in input().split()]
d=li[0]
a=1
while d<=x and a<len(li):
  d+=li[a]
  a+=1
print(a)

Submission status: Wrong Answer

Solution code:
inp_1 = input().split()
n = int(inp_1[0])
x = int(inp_1[1])
l_in = input().split()

count = 0
d = 0
for i in range(n):
    if d + int(l_in[i]) <= x:
        count = count+1

print(count)

Submission status: Wrong Answer

Solution code:
n,x=map(int,input().split())
ls=list(map(int,input().split()))
c = 0
b = 0
for an in range(n):
    c+=1
    b+=ls[an]
    if b>x:
        break
print(c)

Submission status: Wrong Answer

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

count = 1
d = 0

for i in range(n):
    d += l[i]
    if d > x:
        count += i
        print(count)
        exit()

print(n)