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 = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
a = 0
b = 0
for i in range(n):
  if a <= x:
    b += 1
    a += l[i]
  else:
    break
    
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N, X = input_nums()
    L = input_nums()
    s = 0
    cnt = 0
    for i in range(N):
        if s <= X:
            cnt += 1
        s += L[i]
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,x=INTM()
    l=LIST()
    ct=0
    temp=0
    for i in range(n):
        temp+=l[i]
        if temp<=x:
            ct+=1
        else:
            break
    print(ct)
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(n):
    if sum(l_list[:i+1]) > x:
        print(i+1)
        sys.exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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(1,N):
  d = d + l[i-1]
  if d <= X:
    count += 1
print(count)

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(1,N):
  d = d + l[i]
  if d <= X:
    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n, x = map(int, input().split())
print("n:%d" %n)
print("x:%d" %x)
l = list(map(int, input().split()))
sum = 0
b = 1;
for i in range(n):
	sum = sum + l[i]
	if(sum > x):
		print(b)
		break
	else:
		if(i == n-1):
			print(n+1)
			break
		else:
			b=b+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#s = input().split()
#n = int(s[0])
#x = int(s[1])
n, x = map(int, input().split())
l = list(map(int, input().split()))
if sum(l) <= x:
	print(n)
else :
	for i in range(n):
		ll=l[:i+1]
		#print("sum:%d" % sum(ll))
		if sum(ll) > x:
			print(i+1)

Submission status: Wrong Answer

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

D=0
count=1
while D<=X and count<=N:
   D=D+L[count-1]
   count+=1

print(min(N+1, count-1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 1
for i in l:
    d += i
    cnt += 1
    if d <= x:
        pass
    
    else:
        print(cnt - 1)
        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 l:
    if d <= x:
        d += i
        cnt+= 1
    
    else:
        cnt -= 1
        print(cnt)
        exit()
    
print(cnt)

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 l:
    if d <= x:
        d += i
        cnt+= 1
    
    else:
        cnt -= 1
        print(cnt)
    
print(cnt)

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 l:
    if d <= x:
        d += i
        cnt+= 1
    
print(cnt)

Submission status: Wrong Answer

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

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

print(min(ans, n + 1))

Submission status: Wrong Answer

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

for i in range(n - 1):
    if point + l[i] <= x:
        point = point + l[i]
        ans = ans + 1

print(min(ans, n + 1))

Submission status: Wrong Answer

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

for i in range(n - 1):
    if point + l[i] <= x:
        point = point + l[i]
        ans = ans + 1

print(min(ans, n))

Submission status: Wrong Answer

Solution code:
n, x = map(int, input().split())
l_list = list(map(int, input().split()))
ans = 1
d = 0
for i in range(1, n):
    d = d + l_list[i - 1]
    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()))
z = 0
cnt = 0

while z<=X and cnt<len(L):
    z += L[cnt]
    cnt += 1

print(min(cnt, N+1))

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
li = list(map(int,input().split()))
count = 1
kyori = 0
for i in li:
  kyori = kyori + i
  count += 1
  if kyori > x:
    count -1
    break
print(count)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
li = list(map(int,input().split()))
count = 1
kyori = 0
for i in li:
  kyori = kyori + i
  count += 1
  if kyori > x:
    break
print(count-1)

Submission status: Wrong Answer

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

cnt=0
now=0
for i in l:
  if now<=x:
    cnt+=1
  else:
    break
  now+=i
print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
L = list(map(int,input().split()))
c = 0
d = 0
for i in range(a):
    if c <= b:
        c = c + L[i]
        d = d+1
    else:
        break
print(d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
f=lambda:map(int,input().split())
_,x=f();c=d=0
for i in f():
  c+=1;d+=i
  if d>x: break
print(c)

Submission status: Wrong Answer

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

# ans = 1

# for i in range(N):
#     d += L[i]
#     if d <= X:
#         ans += 1

e = 1


for i in L:
    if d + i <= X:
        d += i
        e += 1

# for i in l:
print(e)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

tmp = 0
for i in range(100):
    tmp += l_list[i]
    if tmp > x:
        break

print(i+1)

Submission status: Wrong Answer

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

if X==0:
    print(0)
    exit()

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

    if D[i]>X:
        print(i)
        exit()
print(i+1)

Submission status: Wrong Answer

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

if X==0:
    print(0)
    exit()

D=[0]*N
for i in range(1,len(L)):
    D[i]=D[i-1]+L[i-1]
    if D[i]>X:
        print(i)
        exit()
print(i+1)

Submission status: Wrong Answer

Solution code:
n,x = map(int,raw_input().split())
l = map(int,raw_input().split())
d1=0
bou = 1
for i in xrange(1,n):
    d1 += l[i-1]
    
     
    if d1 > x:
        break
    else:
        bou += 1
print bou

Submission status: Wrong Answer

Solution code:
n,x = map(int,raw_input().split())
l = map(int,raw_input().split())
d1=0
bou = 1
for i in xrange(1,n):
    di = d1 + l[i-1]
    d1 = di
     
    if di > x:
        break
    else:
        bou += 1
print bou

Submission status: Wrong Answer

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

N,X = list(map(int, input().rstrip().split()))
L_list = list(map(int, input().rstrip().split()))
#-----

D=0
ans = len(L_list) + 1

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

print(ans)

Submission status: Wrong Answer

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

N,X = list(map(int, input().rstrip().split()))
L_list = list(map(int, input().rstrip().split()))
#-----

i=2
D=0
while D <= X:
    D = D + L_list[i-2]
    ans = i-1
    i += 1
    
    if (i-2) > len(L_list)-1:
        break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(len(d)):
    if d[i]>x:
        print(i)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,y=map(int,input().split())
lst=list(map(int,input().split())) 
lst=[0]+lst
cnt=0 
sum_lst=0 
for i in range(n+1): 
	sum_lst+=lst[i]
	if sum_lst<=y:
		cnt+=1
print(cnt-1)

Submission status: Wrong Answer

Solution code:
n,y=map(int,input().split())
lst=list(map(int,input().split())) 
lst=[0]+lst
cnt=0 
sum_lst=0 
for i in range(n+1): 
	sum_lst+=lst[i]
	if sum_lst>=y:
		cnt+=1
print(cnt-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

 
print(ans)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
ans = 0
for i in b:
  if cnt <= x:
    ans += 1
    cnt += i
  else:
    break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
d=[]
d.append(0)
if d[0]>x:
    print(1)
    exit()

for i in range(1,len(l)+1):
    d.append(d[i-1]+l[i-1])
    if d[i]>x:
        print(i+1)
        exit()

Submission status: Wrong Answer

Solution code:
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
d=[]
d.append(0)
if d[0]>x:
    print(1)
    exit()

for i in range(1,len(l)+1):
    d.append(d[i-1]+l[i-1])
    if d[i]>x:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
d=[]
d.append(0)
if d[0]>x:
    print(0)
    exit()

for i in range(1,len(l)+1):
    d.append(d[i-1]+l[i-1])
    if d[i]>x:
        print(i)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
b = list(map(int,input().split()))
cnt  = 0
ans = 0
while cnt<=x:
  if ans >= len(b):
    break
    
  cnt += b[ans]
  ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def next_pos(D,L):
    return D+L
    
N, X = map(int,input().split(" "))
L = [int(i) for i in input().split(" ")]
D = 0
count = 0

for i in range(N):
    if D<=X:
        count+=1
    D = next_pos(D,L[i])

    
print(count)

Submission status: Wrong Answer

Solution code:
def next_pos(D,L):
    return D+L
    
N, X = map(int,input().split(" "))
L = [int(i) for i in input().split(" ")]
D = 0
count = 0
i = 0

while(D<=X):
    if i==N:
        break
    D = next_pos(D,L[i])
    count+=1
    i+=1
    
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N,X= map(int,input().split())
li = list(map(int,input().split()))
count = 0
li.append(0)
li2 = sorted(li)
for i in range(len(li2)):
    if li[i]+li[i-1]<=X:
        count +=1
    else:
        pass
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=0
d=1
for i in range(a):
  c+=l[i]

  if c>=b:
    print(d)
    break
  d+=1

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=0
d=1
for i in range(a):
  c+=l[i]

  if c>b:
    print(d)
    break
  d+=1

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=0
d=0
for i in range(a):
  c+=l[i]

  if c>b:
    print(d+1)
    break
  d+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, x = map(int, input().split())
a = [ int(x) for x in input().split() ]
cnt = 0
s = 0
for aa in a:
    if s <= x:
        cnt += 1
    s += aa

print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

num = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:

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

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

print("sum:{0} cnt:{1}".format(sum, cnt))

Submission status: Wrong Answer

Solution code:

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

cnt = 0
sum = 0
for i in range(len(L)):
    sum += L[i]
    cnt += 1
    if(sum > X):
        break

print(cnt)

Submission status: Wrong Answer

Solution code:

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math
import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
li0= [int(x) for x in input().split()]
ans=1
count=li0[0]
for i in li0[1:]:
  if count<=l:
    count+=i
    ans+=1
  else:
    break
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
li0= [int(x) for x in input().split()]
ans=count=0
for i in li0:
  if count<=l:
    count+=i
    ans+=1
  else:
    break
print(ans)

Submission status: Wrong Answer

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

ans = 1
d = 0
for i in range(1, n):
  d = d + l[i-1]
  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()))

sumL = 0
count = 0

for x in range(len(L) + 1):
    if sumL <= X:
        count += 1
    sumL += x
print(count)

Submission status: Wrong Answer

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

sumL = 0
count = 0

for x in L:
    if sumL <= X:
        count += 1
    sumL += x
print(count)

Submission status: Wrong Answer

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

za = 0
count = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
listl = []
listl += map(int,input().split())
# print(listl)

cnt=1
d=0
# print(d)
while cnt<len(listl):
    d = d+listl[cnt]
    if d > x:
        break
    # print(d)
    cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
listl = []
listl += map(int,input().split())
# print(listl)

cnt=0
d=0
# print(d)
while cnt<len(listl):
    d = d+listl[cnt]
    if d > x:
        break
    # print(d)
    cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
n,x = map(int,input().split())
listl = []
listl += map(int,input().split())
# print(listl)

cnt=0
d=0
# print(d)
while cnt<len(listl):
    if d > x:
        break
    d = d+listl[cnt]
    # print(d)
    cnt+=1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]
    d = [0]

    for i in range(n):
        d.append(d[i]+l[i])

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

    print(result)
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]
    d = [0]

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

    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]

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

    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]

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

    print(i)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]

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

    print(i if i<n else i-1)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    n,x = t[0],t[1]

    l = [int(t)for t in input().split()]

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

    print(i)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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)
        break
else:
    print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

D =[]
D.append(0)
x = 0

for i in range(N):
  x += L[i]
  D.append(x)
  
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
from itertools import accumulate
n,x = map(int,input().split())
lst_l = [0] + list(map(int,input().split()))
lst_wa = list(accumulate(lst_l))
cnt = 0
for i in lst_wa:
    if i < x:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


n, x = map(int, input().split())
l = list(map(int, input().split()))
# print(l)
ll = [0]
sum = 0
for i in range(n):
    sum += l[i]
    ll.append(sum)
# print(ll)

cnt = 0
for i in range(n):
    if ll[i] <= x:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

# 累積和 cumulative sum
ans = 0
cumul = [0]
for i, l in enumerate(L):
  d = cumul[-1] + l
  if d > X:
    #print(i, d)
    ans = i + 1
    break
  cumul.append(d)

#print(cumul)
print(ans)

Submission status: Wrong Answer

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


def solve(N: int, X: int, L: "List[int]"):
    d = 0
    for i, l in enumerate(L, 1):
        d += l
        if d > X:
            print(i)
            return
    return


# Generated by 1.1.6 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:
import sys
input = sys.stdin.readline
N, X = map(int, input().split())
a = list(map(int, input().split()))
cs = [0] * (N + 1)
for i in range(N): cs[i + 1] = cs[i] + a[i]
res = N
for i in range(N + 1):
  if cs[i] > X:
    res = i
    break
print(res)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N, X = map(int, input().split())
a = list(map(int, input().split()))
cs = [0] * (N + 1)
for i in range(N): cs[i + 1] = cs[i] + a[i]
res = 0
for i in range(N + 1):
  if cs[i] > X:
    res = i
    break
print(res)