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:
# -*- coding: utf-8 -*-
n, x = map(int, input().split())
ls = list(map(int, input().split()))

d = 0
for i in range(n):
    d = d + ls[i]
    if d > x:
        break

print(i + 1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

li = []
for i in range(n):
    if i == 0:
        li.append(l[i])
    else:
        li.append(l[i]+li[i-1])

flag = True
for i in range(n):
    if li[i]>x:
        ans = i+1
        flag = False
        break

if flag:
    print(n)
else:
    print(ans)

Submission status: Wrong Answer

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

ans = 0
D = [0] * N
for i in range(N):
    if i != 0:
        D[i] = D[i-1] + L[i-1]
    if D[i] <= X:
        ans += 1
    else:
        break
print(ans)

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

cnt = 0
length = 0

for l in ls:
    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
for answer in range(n):
    d += l[answer]
    if d > x:
        break
print(answer+1)

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 l:
    if X < d:
        break
    d += i
    count+=1

print(count)

Submission status: Wrong Answer

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

print(len(Ls))

Submission status: Wrong Answer

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

D = 0
for i in range(len(L_list)):
    D += L_list[i]
    if D > x:
        print(i + 1)
        break

Submission status: Wrong Answer

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

L = input().split()
cnt = 0
pos = 0
for i in range(N):
        if(pos <= X):
                pos += int(L[i])
                cnt += 1
        else:
                break
print(cnt)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

count = 0
D = 0
for l in L:
    if D <= X:
        count += 1
    D = D + l

print(count)

Submission status: Wrong Answer

Solution code:
##!/usr/bin/env python3
import sys
# from operator import itemgetter
# gcd
# from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
# fin = open('in_1.txt', 'r')
# sys.stdin = fin
# # 提出時はコメントアウト+上のshebangを有効にする
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    L = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"

    # write code
    tmp = 1
    D = 0
    i = 0
    while True:
        D += L[i]
        i += 1
        tmp += 1
        if D > X or tmp == N+1:
            break
    print(tmp-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

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

tmp = 0
for il,i in zip(l,range(len(l))):
    tmp+=il
    if tmp > x:
        break
if l[0] <= x:
    print(i+1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, X: int, L: "List[int]"):
    d = [0]*(N+2)
    for i in range(1,N):
        d[i] = d[i-1] + L[i-1]

    ans = 0
    for i in range(len(d)):
        if(d[i] <= X):
            ans += 1

    print(ans-2)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    L = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, X, L)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
N, X = input().split()

N = int(N)
X = int(X)

l_list = input().split()

c = 0
for i in range(N):
    if i == 0:
        d = 0
        c += 1
    else:
        d += int(l_list[i-1])
        if d > X:
            break
        else:
            c += 1
print(c)

Submission status: Wrong Answer

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

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

print(i + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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


curpos = 0
times = 0
while curpos <= x and not times == n:
    curpos += Ln[times-1]
    times += 1


print(times)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N,x = [int(i) for i in input().split()]
l = input().split()
count = 0
ordinate = 0
for i in range(N):
    count += 1
    ordinate += int(l[i])
    if ordinate > x:
        break
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 16 20:56:28 2019

@author: Yamazaki Kenichi
"""

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

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

print(i+1)

Submission status: Wrong Answer

Solution code:
#b.py
n,x = map(int,input().split())
lis = list(map(int,input().split()))

ans = 1
now = 0
for _ in lis:
    now += _
    if x >= now:
        ans += 1
    else:
        print(ans)
        break

Submission status: Wrong Answer

Solution code:
n,x=map(int,input().split())
l=list(map(int,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 = list(map(int, input().split()))
s = 0
c = 0
for li in l:
    s += li
    c += 1
    if s > x:
        break
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, X = map(int, input().split())
distance = [int(x) for x in input().split()]
from0 = 0
ans = 1
for i in range(N):
    if from0 + distance[i] <= X:
        ans += 1
        from0 += distance[i]

print("{}".format(ans))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input().split()
N = int(line[0])
X = int(line[1])
line = [int(p) for p in input().split()]
pos = 0
count = 0
for i in range(len(line)):
  if pos > X:
    break
  pos += line[i]
  count+=1
print(count)

Submission status: Wrong Answer

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

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	n,x = map(int, io().split())
	ll= list(map(int, io().split()))
	pos=n
	if n > x:
		return 0
	cc=1
	for l in ll:
		pos += l
		if pos > x:
			break
		cc+=1
			
	return cc

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Submission status: Wrong Answer

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

tmp=0
cnt=0
m=[]
for i in range(n):
    m.append(tmp)
    tmp+=l[i]

for i in range(n):
    if m[i]<=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
cost = 1
for i in range(N-1):
    D = D + L[i]
    if D > X:
        break
    cost += 1

print(cost)

Submission status: Wrong Answer

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

#ls = [sum(Ls[:i+1]) for i in range(N)]
D = 0
out = 0
for L in Ls:
    out += 1 
    D = D + L
    if D > X:
        break

print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = 0
cnt = 0
for l in distances:
  if d <= x:
    cnt += 1
  else:
    break
  d += l

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys

def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))

    cnt = 0
    D = 0
    while D <= X and cnt < len(A):
        D += A[cnt]
        cnt += 1

    return cnt


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(len(output))

Submission status: Wrong Answer

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

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

print(i)

Submission status: Wrong Answer

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

D = []
D.append(0)
for i in range(N):
    din = D[i]+L[i]
    D.append(din)
count = 0
for i in range(N):
    if D[i] <= X:
        count = 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 ,raw_input().split())
L =list(map(int ,raw_input().split()))
p = 0
y = -1
for i in range(N):
    p += L[i]
    if p>X:
        y = i
        break
if y>=0:
    print y
else:
    print N

Submission status: Wrong Answer

Solution code:
hoge = input().split()
N = int(hoge[0])
X = int(hoge[1])
L = []
huga = input().split()
for i in range(N):
  L.append(int(huga[i]))
  
now = 0
count = 0
for i in range(len(L)):
  if now <= X:
    count += 1
  now += L[i]

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,X=map(int,input().split())
L=[int(_) for _ in input().split()]
count=0
x=0
for n in range(N):
    if x<=X:
        count+=1
    x+=L[n]
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

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

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


x = np.zeros(N)

for n in range(1,N):
    x[n] = x[n-1] + L[n-1]
    if x[n] > X:
        print(n)
        sys.exit()

print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, x = map(int, input().split())
L = list(map(int,input().split()))
sum = 0
a = 0
for i in L:
    if sum <= x:
        a += 1
    else:
        break
    sum += i
print(a)

Submission status: Wrong Answer

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

for i in range(n):
    if d <= x:
        c += 1
    d += l[i]

print(c)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    if i == n:
        break

if i != n:
    print(i)
else:
    print(i + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:


def main():
    num, x = map(int, input().split())
    data = list(map(int, input().split()))
    now = 0
    ans = 0
    for i in range(num):
        ans += 1
        now += data[i]
        if now > x:
            break

    print(ans)





if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

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

sum_ = 0

ans = 0

for i in range(N):
    sum_ += L_lst[i]
    if sum_ > X:
        ans = i + 1
        break

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 range(N):
    if d > X:
        print(ans)
        exit()
    ans += 1
    d += int(L[i])
print(ans)

Submission status: Wrong Answer

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

total = 0

for lc,l in enumerate(list_l):
    total += l
    if (total > x):
        break

print(lc + 1)

Submission status: Wrong Answer

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


def main():
    n, x = map(int, input().split())
    ls = list(map(int, input().split()))
    count = 0
    d = 0

    for i in range(1, n + 1):
        d = d + ls[i - 1]
        count += 1

        if d > x:
            print(count)
            exit()


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    ans = 0
    j = 0
    for v in L:
        ans += 1
        j += v
        if j > X:
            break
    print(ans)


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

readline = sys.stdin.readline

N, X = map(int, readline().split())
L = list(map(int, readline().split()))

p = 0
count = 0
for l in L:
    if p <= X:
        count += 1
        p += l
    else:
        break

print(count)

Submission status: Wrong Answer

Solution code:
from sys import exit

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

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

ans = 1

x = 0

for l in L:
    x += l
    if x <= X:
        ans += 1
    else:
        print(ans)
        exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
zahyo = 0

for i in range(N):
    count += 1
    zahyo = zahyo + li_L[i]
    if zahyo > X:
        break
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
ans=1
pos=0
for l in L:
    if pos+l <= X:
        ans+=1
        pos+=l
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
NX = [int(i) for i in input().split()]
L = [int(i) for i in input().split()]
answer = 0
sum = 0
for i in range(len(L)):
    answer += 1
    sum += L[i]
    if(sum > NX[1]):
        break
print(answer)

Submission status: Wrong Answer

Solution code:
n,x=map(int,input().split())
d=list(map(int,input().split()))
s=0
for i,dk in enumerate(d):
    s+=dk
    if s>x:
        print(i+1)
        break
else:
    print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
pos = 0

for val in l:
	pos += val
	count += 1
	if pos > x:
		break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(n+1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

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

tmp = 0
for il,i in zip(l,range(len(l))):
    tmp+=il
    if tmp > x:
        break
    
print(i+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8


def main():
    # N = int(input())
    N, X = map(int, input().split())
    L = list(map(int, input().split()))

    ans = 0
    d = 0
    i = 0
    while d <= X and i < N:
        ans += 1
        d += L[i]
        i += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(len(l)):
    t += l[i]
    if x < t:
        print(i + 1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
llist = list(map(int,input().split()))
ans = 0
now = 0
for i in llist:
    if now <= x:
        ans += 1
    now += i
print(ans)

Submission status: Wrong Answer

Solution code:
p = input().split()
n,x = int(p[0]),int(p[1])
ls = input().split()
s = 0
for i in range(n):
    s += int(ls[i])
    if s > x:
        print(i+1)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
res = 0
for l in l_list:
    if res <= x:
        count += 1
    else:
        break
    res += l
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC130B - Bounding
n, x = list(map(int, input().rstrip().split()))
lst = list(map(int, input().rstrip().split()))
cur, ans = 0, 0
for i in lst:
    if cur <= x:
        ans += 1
    cur += i
print(ans)

Submission status: Wrong Answer

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

tmp = 0
count = 0
for i in range(n):
    tmp += L[i]
    count += 1
    if x < tmp:
        print(count)
        break

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7)

#debug = True
debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)



def solve():
    n, x = map(int, input().split())
    l_list = list(map(int, input().split()))

    d = 0
    count = 1
    for l in l_list:
        d = d + l
        if d <= x:
            count += 1
        else:
            print(count)
            break

solve()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
 
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    N, X = list(map(int,input().split()))
    L=LI()
    L1=0
    out=1
    for l in L:
        D=L1+l
        print(D)
        if D<X+1:
            out+=1
        L1=D
    print(out)
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N, X = map(int, raw_input().split())

L = map(int, raw_input().split())

bound_count = 1
sum_L = 0

for l in L:
    sum_L += l
    if sum_L > X:
        print bound_count
        break
    bound_count += 1