TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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?

Submission attempts (in order):
n, x = map(int, input().split())

if n == 0:
    print(0)

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

if x == 0:
    print(1)


else:

    sum = 0
    v=0
    for i, l in enumerate(li):
        v = i
        if sum > x:
            break

        sum += l

    if v+1 == len(li):
        print(v+1)
    else:
        print(v)



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

if n == 0:
    print(0)
else:

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

    if x == 0:
        print(1)


    else:

        sum = 0
        v=0
        for i, l in enumerate(li):
            v = i
            if sum > x:
                break

            sum += l

        if v+1 == len(li):
            print(v+1)
        else:
            print(v)



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

if n == 0:
    print(0)
else:

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

    if x == 0:
        print(0)


    else:

        sum = 0
        v=0
        for i, l in enumerate(li):
            v = i
            if sum > x:
                break

            sum += l

        if v+1 == len(li):
            print(v+1)
        else:
            print(v)



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

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

if x == 0:
    print(1)
else:

    sum = 0
    v=0
    for i, l in enumerate(li):
        v = i
        if sum > x:
            break

        sum += l

    if v+1 == len(li):
        print(v+1)
    else:
        print(v)



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

if n == 0:
    print(0)
else:
    li = list(map(int,input().split()))
    if x == 0:
        print(1)

    else:

        sum1 = 0
        v = 1

        for l in li:
            sum1 += l
            if sum1 > x:
                break
            v += 1


        print(v)



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

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

print(cnt)

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n,x =map(int,input().split())
l1=list(map(int,input().split()))
l2=[0]
for i in range(len(l1)):
  l2.append(l2[i]+l1[i])
ans=0
i=0
print(l2)
while i<len(l2):
  if l2[i]<=x:
    ans+=1
  i+=1
print(ans)

n,x =map(int,input().split())
l1=list(map(int,input().split()))
l2=[0]
for i in range(n):
  l2.append(l2[i]+l1[i])
ans=0
i=0
while i<len(l2):
  if l2[i]<=x:
    ans+=1
  i+=1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
mport sys

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

    return cnt

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

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

ans = [0]
cnt =0
for i in L:
    cnt =i + cnt
    if cnt <= X:
        ans.append(cnt)
    else:
        break
print(ans)        
print(len(ans))

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

ans = [0]
cnt =0
for i in L:
    cnt =i + cnt
    if cnt <= X:
        ans.append(cnt)
    else:
        break
   
print(len(ans))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X=map(int,input().split())
L=list(map(int,input().split()))

D=[0]*(N-1)

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

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

D=[0]*(N+1)

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


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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+1)

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

print(N)

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

cnt = 1
sum_L = 0
for l in L:
    sum_L += l
    if sum_L <= X:
        cnt += 1
    else:
        break

print(cnt)


Verdicts: Wrong Answer

Accepted
Problem: 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?

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

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


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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n,x = map(int,input().split())
if n != 1:
  l = list(map(int,input().split()))
  i = 0
  cnt = 0
  ans = 0
  while cnt <= x :
    ans += 1
    cnt += l[i]
    i += 1
    if i == n-1:
      print(n+1)
      exit()
  print(ans)
else:
  l = int(input())
  if l <= x:
    print(2)
  else:
    print(1)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int,input().split())
L = list(map(int,input().split()))
List = [0]*(N+1)
for i in range(1,N+1):
    List[i] = List[i-1] + L[i-1]
print(List)
import bisect  

# print(len(A))
print(bisect.bisect_left(List,X+1))


N,X = map(int,input().split())
L = list(map(int,input().split()))
List = [0]*(N+1)
for i in range(1,N+1):
    List[i] = List[i-1] + L[i-1]
import bisect  

# print(len(A))
print(bisect.bisect_left(List,X+1))


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x=map(int,input().split())
l=[int(i) for i in input()split()]
a=0
ans=0
for i in l:
  if a+i>x:
    print(ans+1)
    exit()
  ans+=1
  a+=i
print(ans)

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


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N,X=map(int,input().split())
L=list(map(int,input().split()))
sum=0
for i in range(N):
  sum+=L[i]
  count=i
  if sum>X:
    print(i+1)
    break
print(count+2)


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


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = map(int, input().split())
L = list(map(int, input().split()))

count = 1
p = 0
for l in L:
    if p <= x:
        p += l
        count += 1
print(count)


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

count = 0
p = 0
for l in L:
    if count <= x:
        p += l
        count += 1
print(count)


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

count = 0
p = 0
for l in L:
    if p <= x:
        p += l
        count += 1
if p <= x:
    count += 1
print(count)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n , x  = map(int , input().split())
L = (input().split())

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

print(cnt)

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

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

print(cnt)

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

cnt = 1
dis = 0
for i in range(n):
    dis = dis + int(L[i])


    if dis <= x :
            cnt +=1

print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int, input().split())
L = list(map(int, input().split()))
count = 0
D = 0

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

print(count)
  

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

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

print(count)
  

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 += 1
  else:
    break

print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = input().split()
n, x = int(n), int(x)
arr = [int(x) for x in input().split()]

pf = [arr[0] for i in range(n)]

for i in range(1, n):
    pf[i] = pf[i-1] + arr[i]

c = 0
for i in pf:
    c += (i <= x)

print(c)

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

pf = [arr[0] for i in range(n)]

for i in range(1, n):
    pf[i] = pf[i-1] + arr[i]

c = 0
for i in pf:
    c += (i <= x)

print(c+1)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x = map(int,input().split())
l = list(map(int,input().split()))
i=0
suml=0
if sum(l)<=x:
    print(len(l))
else:
    while suml<=x:
        suml=suml+l[i]
        i=i+1
    if suml>=x:
        print(i-1)
    else:
        print(i)

n,x = map(int,input().split())
l = list(map(int,input().split()))
i=0
suml=0
if sum(l)<=x:
    print(len(l))
else:
    while suml+l[i]<=x:
        suml=suml+l[i]
        i=i+1
    print(i)

n,x = map(int,input().split())
l = list(map(int,input().split()))
i=0
suml=0
if sum(l)<x:
    print(len(l))
else:
    while suml<=x:
        suml=suml+l[i]
        i=i+1
        print(i)

n,x = map(int,input().split())
l = list(map(int,input().split()))
i=0
suml=0
if sum(l)<=x:
    print(len(l)+1)
else:
    while suml<=x:
        suml=suml+l[i]
        i=i+1
    print(i)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N,X=map(int,input().split())
L = list(map(int, input().split()))
D=0
result=1
for n in range(1,N):
    if X<=(D):
        break
    else:
        result+=1
        D=D+L[n-1]
print(result)

N,X=map(int,input().split())
L = list(map(int, input().split()))
l=0
result=1
for n in L:
    l+=n
    if l<=X:
        result+=1
print(result)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int,input().split())
L = list(map(int,input().split()))

cnt=1
dist=0

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

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

cnt=1
dist=0

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

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

cnt=1
dist=0

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

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

cnt=1
dist=0

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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?

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

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)


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)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
limit = input().split()
hane = input().split()
hane = [int(i) for i in hane]

tmp = 0
ans = 0
for i in hane:
  tmp += i
  if tmp<=int(limit[1]): ans +=1
  else: break
    
print(ans)

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

tmp = 0
ans = 0
for i in hane:
  tmp += i
  if tmp<=int(limit[1]): ans +=1
  else: break
    
print(ans+1)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x=map(int,input().split())
L = list(map(int, input().split()))
c = 0
D = 0
for i in L:
  	c = c + 1
    D = D + i
    if D > x:
        print(c)
        exit()
if D > x:
  print(c)
else:
  print(c+1)


n,x=map(int,input().split())
L = list(map(int, input().split()))
c = 1
D = 0
for i in L:	
    D = D + i
    if D > x:
        print(c)
        exit()
    c = c + 1
print(c)



Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n,x=map(int,input().split())
ans=0
oh=0
l=[int(i) for i in input().split()]
l[0]=0
for j in l:
  if x>=oh:
    ans+=1
  oh+=j
print(ans)
  

,x=map(int,input().split())
ans=0
oh=0
l=[int(i) for i in input().split()]
for j in l:
  if sum(l)<=x:
      if x>=oh:
          ans+=1
  elif x>=oh:
      ans+=1
  oh+=j   
if sum(l)<=x:
  print(ans+1)
else:
  print(ans)
  

n,x=map(int,input().split())
ans=0
oh=0
l=[int(i) for i in input().split()] 
for j in l:
  if x>=oh:
    ans+=1
  oh+=j
if sum(l)<=x:
    print(ans+1)
else:
  print(ans)
  

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int, input().split())
l =list(map(int, input().split()))

d=[0]
for v in l:
    d.append(d[-1]+v)

print(len([_ for v in d if v <= X]))

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

d=[0]
for v in l:
    d.append(d[-1]+v)

print(len([v for v in d if v <= X]))

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n,x = map(int,input().split())
l = list(map(int,input().split()))
for i in range(n-1): l[i+1] += l[i]
ans = 1
print(l)
for i in range(n):
  if l[i] <= x: ans += 1
print(ans)
    

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)




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:
        break
    else:
        count = count+1
        d = d + int(l_in[i])
print(count)




Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]
for i in range(n):
  d.append(d[-1]+l[i])
  if d[-1]>x:
    print(len(d)-1)
     break
  if i==n-1:
    print(n+1)

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int, input().split())

# List = list([map(int, input().split())] for _ in range(N))
# List = [list(map(int, input().split())) for _ in range(N)]
List = list(map(int, input().split()))
print(List)

ans = 1
sum_x = 0
for i in range(N):
    if(sum_x + List[i] <= X):
        # print(List[i])
        sum_x += List[i]
        ans += 1
# print(sum_x)
print(ans)


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

# List = list([map(int, input().split())] for _ in range(N))
# List = [list(map(int, input().split())) for _ in range(N)]
List = list(map(int, input().split()))
# print(List)

ans = 1
sum_x = 0
for i in range(N):
    if(sum_x + List[i] <= X):
        # print(List[i])
        sum_x += List[i]
        ans += 1
    else:
        break
# print(sum_x)
print(ans)



Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X=[int(x) for x in input().split(' ')]
arr=[int(x) for x in input().split(' ')]
temp=0
for x in range(N):
  if arr[x]+temp>X:
    temp=x
    break
  else:
    temp+=arr[x]
print(temp)

N,X=[int(x) for x in input().split(' ')]
arr=[int(x) for x in input().split(' ')]
temp=0
flag=0
for x in range(N):
  if arr[x]+temp>X:
    temp=x
    flag=1
    break
  else:
    temp+=arr[x]
if flag:
  print(temp+1)
else:
  print(N+1)

Verdicts: Wrong Answer

Accepted
Problem: 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?

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
s = list(map(int, input().strip().split(' ')))
L = list(map(int, input().strip().split(' ')))

D = [0] * (s[0] + 1)
count = 0

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

print(count)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int,input().split())
Ls = list(map(int,input().split()))

D = 0
ans = 0

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

print(ans)

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

D = 0
ans = 1

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

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int, input().split())
L = map(int, input().split())

D = 0
count = 1

for l in L:
    D += l

    if D <= X:
        count += 1

    else:
        breakXh

print(count)


N, X = map(int, input().split())
now = 0
res = 1
for l in map(int, input().split()):
    now += l
    if now <= X:
        res += 1

print(res)



Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=0

#print(L)
#print(D)

for i in range(N):
  #print(i+2,end=" ")
  #print(L[i],end=" ")
  D=D+L[i]
  #print(D)
  if D>X:
    print(i+1)
    break
print(N+1)

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

#print(L)
#print(D)

for i in range(N):
  #print(i+2,end=" ")
  #print(L[i],end=" ")
  D=D+L[i]
  #print(D)
  if D>X:
    print(i+1)
    exit()
    
print(N+1)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = map(int, input().split())
L = [l for l in map(int, input().split())]

dist = 0

for (i, v) in enumerate(L):
  dist += v
  print(dist)
  if dist <= x:
    continue
  else:
    break
    
print(i+1)



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

dist = 0
num = 1

for (i, v) in enumerate(L):
  dist += v
  if dist <= x:
    num += 1
    continue
  else:
    break
    
print(num)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 0
a = 0
for i in range(n):
    a+=l[i]
    if a<=x:
        m+=1

print(m)

n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 0
a = 0
while(a<=x):
    a+=l.pop(0)
    m+=1
    if l!=[]:
        break
print(m)

n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 1
a = 0
for i in l:
    a+=i
    if a<=x:
        m+=1
print(m)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0 for i in range(N + 1)]
bounding = 0
for i in range(1, N - 1):
    D[i + 1] = D[i] + L[i + 1]

for d in D:
    if d <= X:
        bounding += 1
        
print(bounding)

N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0 for i in range(N + 1)]
bounding = 0
for i in range(N):
    D[i + 1] = D[i] + L[i]

for d in D:
    if d <= X:
        bounding += 1

print(bounding)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int,input().split())
L = list(map(int,input().split()))

D = [0]

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

print(len(D))


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

D = [0]

ans = 1

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

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int,input().split())
bound_limit= N+1
L = list(map(int,input().split()))
sum=0
count=1
for i in range(0,len(L)):
  sum+=L[i]
  if sum<=x:
    count+=1
  else:
    break
print(count)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n, x = (int(i) for i in input().split())  
l = list(int(_) for _ in input().split()) 
distance=0
_count=1
for i in range(0, n+1):
    distance += l[i]
    if distance<=x:
        _count += 1
print(_count)

n, x = (int(i) for i in input().split())  
l = list(int(_) for _ in input().split()) 
distance=0
_count=1
for i in range(0, n):
    distance += l[i]
    if distance<=x:
        _count += 1
    else:
        break
print(_count)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
def solve(n, x, l):
    ans = 1
    d = 0
    for i in range(n)
        d += l[i]
        if d <= x:
            ans += 1
    return ans
    
n, x = map(int, input().split())
l = list(map(int, input().split()))
print(solve(n, x, l))


def solve(n, x, l):
    ans = 1
    d = 0
    for i in range(n):
        d += l[i]
        if d <= x:
            ans += 1
    return ans

n, x = map(int, input().split())
l = list(map(int, input().split()))
print(solve(n, x, l))



Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
cnt=1
d=0
for i in L:
    d+=L[i]
    if d<=X:
        cnt+=1

print(cnt)

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]



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]

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()


N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
cnt=1
d=0
for i in L:
    d+=i
    if d<=X:
        cnt+=1

print(cnt)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
print(1, d, x)
for i in range(n):
    d = d + l[i]
    print(i+2, d, x)
    if d > x:
        print(i+1)
        exit()
print(n+1)


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

Verdicts: Wrong Answer

Accepted
Problem: 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?

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




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





Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = list(map(int, input().split()))
a = list(filter(lambda e: int(e) <= x, input().split()))
print(len(a))

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)

n, x = list(map(int, input().split()))
a = list(map(int, input().split()))
for i in range(1, n):
  a[i] += a[i - 1]
  if a[i] > x:
    print(i + 1)
    exit()
print(n + 1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import numpy as np
N,X = map(int,input().split())
L = list(map(int,input().split()))
Lcs = np.array(L)
b_count = 0
for l in Lcs:
  b_count += 1
  if X <= l:
    break
print(b_count)

import numpy as np
N,X = map(int,input().split())
L = list(map(int,input().split()))
Lcs = np.array(L)
b_count = 0
for l in Lcs:
  b_count += 1
  if X < l:
    break
print(b_count)

import numpy as np
N,X = map(int,input().split())
L = list(map(int,input().split()))
La = np.array(L)
Lcs = La.cumsum()
b_count = 1
for l in Lcs:  
  if X < l:
    break
  b_count += 1
print(b_count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
print(0)

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

n,x =map(int,input().split())
L=list(map(int,input().split()))
A = [0] * (n+1)
for i in range(1,n+1):
    A[i] = A[i-1] + L[i-1]
cnt=0
for i in range(n+1):
    if A[i] <= x:
        cnt+= 1
print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N,X = map(int, input().split())
L= list(map(int, input().split()))

count= 0
sumList=[]
sumList.append(0)

for i in range(N):
  sumList.append(sum(L[0:i+1]))
  if(sum(L[0:i+1]) == X):break

print(len(sumList))

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

count= 0
sumList=[]
sumList.append(0)

for i in range(N):
  if(sum(L[0:i+1]) > X):break
  sumList.append(sum(L[0:i+1]))

print(len(sumList))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

N, X = mi()
L = li()

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

print(count)

import sys
def input(): return sys.stdin.readline().strip()
 
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))
 
N, X = mi()
L = li()
 
count = 1
D = 0
for i in range(N):
  D += L[i]
  if X >= D:
    count += 1
  else:
    break
 
print(count)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):


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

d = 1
count = 1

for y in range(n):
  d = d + l[n]
  if d <= x:
    count += 1
  else:
    break
    
print(count)
  





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

d = 0
count = 1

for y in range(n):
  d = d + l[y]
  if d <= x:
    count += 1
  else:
    break
    
print(count)
  

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N,X=map(int,input().split())
L=list(map(int,input().split()))

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


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

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


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

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


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

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


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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,x=(int(i) for i in input().split())
d=0
c=1
l=[int(i) for i in input().split()]
for i in range(n):
  d=d+l[i]
  if d<=x:
    c=c+1
  elif d>x:
    print(c)
    break
print(c)

n,x=(int(i) for i in input().split())
d=0
c=0
l=[int(i) for i in input().split()]
for i in range(n):
  d=d+l[i]
  if d<=x:
    c=c+1
  elif d>x:
    print(c)
    break

n,x=(int(i) for i in input().split())
d=0
c=0
for i in range(n):
  l=int(input())
  d=d+l
  if d<=x:
    c=c+1
  elif d>x:
    print(c)
    break

n,x=(int(i) for i in input().split())
d=0
c=1
l=[int(i) for i in input().split()]
for i in range(n):
  d=d+l[i]
  if d<=x:
    c=c+1
  elif d>x:
    break
print(c)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
from collections import deque

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

l = deque(list(map(int,input().split())))
count = 0
while count < x:
    count += l.popleft()

print(n-len(l)+1)

from collections import deque

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

l = deque(list(map(int,input().split())))
count = 0

if sum(l) <= x:
    print(n+1)
else:
    while count <= x:
        count += l.popleft()
        if len(l) == 0:
            break

    print(n-len(l))

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N, X = map(int, input().split())
L = list(map(int, input().split()))



g = 0
cnt = 0
for l in L:
    g += l
    if X < g:
        break
    cnt += 1

print(cnt)

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

print("N:{},X:{}".format(N, X))
print(L)

g = 0
cnt = 0
for l in L:
    g += l
    if X < g:
        break
    cnt += 1

print(cnt)

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


g = 0
cnt = 1
for l in L:
    g += l
    if X < g:
        break
    cnt += 1

print(cnt)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n, x = map(int, input().split())
l_list = []
l_list.append(0)
l_list[1:] = list(map(int, input().split()))
print(l_list)
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)

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

print(ans)

Verdicts: Wrong Answer

Accepted