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())
l = list(map(int, input().split()))

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

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

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

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

count = 0
for i in range(n - 2):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

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

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

if x > sum(d):
    ans += 1

print(ans)

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

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

if x >= sum(l):
    ans += 1

print(ans)

Verdicts: 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()) 
List = list(map(int,input().split())) 

count = 1
point = 0

while point <= X and count <= N:
    point += List[count-1]
    count += 1

print(count)

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

count = 1
point = 0

while point <= X and count <= N:
    point += List[count-1]
    if point <= 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())
L = list(map(int,input().split()))
ans = 1
D = L[0]
while D<=X and ans<N+1:
    ans+=1
    if ans < N+1: 
        D+=L[ans-1]
    print("座標 {}".format(D))
print(ans)

N, X = map(int,input().split())
L = list(map(int,input().split()))
ans = 1
D = L[0]
while D<=X and ans<N+1:
    ans+=1
    if ans < N+1: 
        D+=L[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):
alfa=input()
N=int(alfa[0])
X=int(alfa[2])

L=input().split()


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


alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()


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


alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()


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


alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()


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


N=int(input())
X=int(input())
L=[int(input()) for i in range(N)]

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


alfa=int(input())
L=[int(input()) for i in range(N)]

N=alfa[0]
X=alfa[2]

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


alfa=input()
N=int(alfa[0])
X=int(alfa[2])

L=input().split()


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


alfa=input().split()
N=int(alfa[0])
X=int(alfa[1])

L=input().split()

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

if D<=X:
    print(count)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

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

n,x=[int(x) for x in input().split()]
l=[int(x) for x in input().split()]
d=0
cnt=1
for i in range(n):
  d=d+l[i]
  if d<=x:
    cnt+=1
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):
def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 0
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
    
if __name__ == "__main__":
    main()

def main():
    n,x = map(int,input().split())
    l = list(map(int, input().split()))
    dist = 0
    count = 1
    for i in range(n):
        dist += l[i]
        if dist > x:
            break
        count += 1
    print(count)
    
if __name__ == "__main__":
    main()

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
count = 1
for i in L:
    D+=L
    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 i in L:
    D+=i
    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())
nums = [int(i) for i in input().split()]

count = 0
for idx in range(N):
    while count <= X:
        count += nums[idx]

if count == X:
    print(idx + 2)

else:
    print(idx + 1)

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


count = 0
for idx in range(N):
    count += nums[idx]

    if count > X:
        idx += 1
        break
else:
    idx += 2

print(idx)

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

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)

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

c = 1
p = 0
for n in range(N):
  p += L[n]
  c += 1
  if p >= X:
    break
print(c)

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

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

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

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

d = [0]


for i in range(1, n):
    tmp = d[i-1] + l[i-1]
    d.append(tmp)

print(d)


counter = 0

for i in range(len(d)):
    if d[i] <= x:
        counter += 1
    else:
        break

print(counter)


#coding:utf-8
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = [0]


for i in range(1, n+1):
    tmp = d[i-1] + l[i-1]
    d.append(tmp)

#print(d)


counter = 0

for i in range(len(d)):
    if d[i] <= x:
        counter += 1
    else:
        break

print(counter)




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
input = sys.stdin.readline
N,X = map(int,input().split())

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


res = 0
i = 0
ans = 1
for i in range(N):
    res += li[i]
    ans += 1
    if res > X:
        ans -= 1
        break
    
print(res)
print(min(ans,N+1))
    

import sys
input = sys.stdin.readline
N,X = map(int,input().split())

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


res = 0
i = 0
ans = 1
for i in range(N):
    res += li[i]
    ans += 1
    if res > X:
        ans -= 1
        break
print(min(ans,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]*(N+1)
ans = 0
for i in range(1,N+1):
    D[i] = D[i-1] + L[i-1]
    ans += 1  
    
print(ans)

N,X = map(int,input().split())
L = list(map(int,input().split()))
D = [0]*(N+1)
ans = 1
for i in range(1,N+1):
    D[i] = D[i-1] + L[i-1]
    if X>=D[i]:
        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=list(map(int,input().split()))
l=list(map(int,input().split()))
d=0
for i in range(n):
  d+=l[i]
  if d>x:
    print(i)
    break

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

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

print(cnt)

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

print(cnt)

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

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

print(cnt)

Verdicts: Wrong Answer

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())
l_array = [int(i) for i in input().split()]

counter = 0
coordinate = 0

while counter < n+1 and coordinate<=x:
    counter+=1
    if counter = n+1:
        break
    else:
        coordinate += l_array[counter-1]


print(counter)


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

counter = 0
coordinate = 0

while counter < n+1 and coordinate<=x:
    counter+=1
    if counter == n+1:
        break
    else:
        coordinate += l_array[counter-1]


print(counter)


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 re
import numpy as np

N, X = [int(i) for i in re.split(" ", input())]
Ls = [int(i) for i in re.split(" ", input())]
Ds = np.cumsum(Ls)
counts = np.sum(Ls <= X) + 1
print(counts)

import re
import numpy as np
 
N, X = [int(i) for i in re.split(" ", input())]
Ls = [int(i) for i in re.split(" ", input())]
Ds = np.cumsum(Ls)
counts = np.sum(Ds <= X) + 1
print(counts)

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()))
i, d = 0, 0
while i<n and d < x:
    d += l[i]
    i += 1
print(n)

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

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):
#ABC 130, B - bounding
n, x = map(int, input().split(' '))

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

D = []
for i in range(n):
    if i == 0:
        d = 0
    else:
        d = D[i-1] + L[i-1]
    D.append(d)
print(D)

E = [i for i in D if i <= x]
print(len(E))


# ABC130, B - bounding
n, x = map(int, input().split(' '))
L = [int(el) for el in 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

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

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

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 t > x:
    break
print(s)

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

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

print(ans)

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

ans = 1
t = 0
for i in l:
  t += i
  if t <= x: ans += 1
  if t >= x: break
print(ans)

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

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

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


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

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

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

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

print(count)


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

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

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

for e in al:
    if e <= 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 = [int(s) for s in input().split()]
Ls = [int(s) for s in input().split()]
d, ans = 0, 0
for l in Ls:
    print(l, d)
    if d <= X:
        ans += 1 
    d += l
print(ans) 


N, X = [int(s) for s in input().split()]
Ls = [int(s) for s in input().split()]
d, ans = 0, 0
for l in Ls:
    if d <= X:
        ans += 1 
    d += l
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):
n, x = map(int,input().split())
l = list(map(int,input().split()))

d = 0
count = 1
for i in range(n):
    d += l[i]
    if d < x:
        count += 1
    elif d == x:
        print(count+1)
        quit()
    else:
        print(count)

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

d = 0
count = 1
for i in range(n):
    d += l[i]
    if d <= x:
        count += 1
    else:
        print(count)
        quit()
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()))
ans = 1
tmp = [i for i in L if i<X]
for j in tmp:
    ans += 1
print(ans)

N, X = map(int, input().split())
L = list(map(int, input().split()))
ans = 0
tmp = [i for i in L if i<X]
for j in tmp:
    ans += 1
print(ans)

N, X = map(int, input().split())
L = list(map(int, input().split()))
tmp = [0] * (N+1)
for i in range(1,N+1):
    tmp[i] = tmp[i-1] + L[i-1]
print(len([j for j in tmp if j < X+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):
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    cnt = 1
    a = 0

    for i in range(len(L)):
        a += L[i]
        if a <= X:
            cnt += 1
    print(cnt)

    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    cnt = 1
    a = 0

    for i in range(len(L)):
        a += L[i]
        if a <= X:
            cnt += 1
    print(cnt)

N, X = map(int, input().split())    
L = list(map(int, input().split()))
    
cnt = 1
    
a = 0

    
for i in range(len(L)):
    a += L[i]
    if a <= X:
        cnt += 1

print(cnt)

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=map(int,input().split())
L=list(map(int,input().split()))
x=0
ans=1
for l in L:
  x+=L
  if x>X:
    break
  ans+=1
print(ans)

N,X=map(int,input().split())
L=list(map(int,input().split()))
x=0
ans=1
for l in L:
  x+=l
  if x>X:
    break
  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())
L=[int(i) for i in input().split()] 
# N=4
# X=9
# L=[3,3,3]

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

N, X = map(int, input().split())
L=[int(i) for i in input().split()] 
# N=4
# X=9
# L=[3,3,3]

a=0
count=1
for i in range(len(L)):
#     print(i)
#     print(L[i])
    a+=L[i]
#     print(a)
    if(a<=X):
#         print(a)
        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())
lst = list(map(int,input().split()))

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

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

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

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())
L=[i for i in map(int,input().split())]
count=1
total=0
for num in L:
    total+=num
    if total>X:
        print(count)
        break
    count+=1
print(count)
        

N,X=map(int,input().split())
L=[i for i in map(int,input().split())]
count=1
total=0
for num in L:
    total+=num
    if total>X:
        print(count)
        break
    count+=1
if total<=X:
    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()))

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


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

S = 0
count = 1
for i in range(N):
  S += L[i]
  if (X < S):
    break
  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())
li = list(map(int, input().split()))
ans = 0
for i in range(len(li)):
    if(sum(li[:i+1]) <= x):
        ans += 1
print(ans)


n, x = map(int, input().split())
li = list(map(int, input().split()))
ans = 1
for i in range(len(li)):
    if(sum(li[:i+1]) <= 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):
n,x=map(int,input().split())
l=[int(x) for x in input().split()]
sum=0
for i in range(n):
  sum+=l[i]
  if sum>x:
    print(i)
    

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



a,b=map(int,input().split())
c=list(map(int,input().split()))
d=0
e=0
f=1
while 1:
  d+=c[e]
  e+=1
  f+=1
  if d>=b:
    print(f)
    break
  else:
    pass

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



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

d = 0
ans = 1
for li in l:
    d += li
    if d > x:
        break
    ans += 1
print(ans)


Verdicts: Wrong Answer

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):
, x = map(int, input().split())
l = [int(i) for i in input().split()] 

d = 0
i = 0
if x > 0:
    while d <= x:
        d = d + l[i]
        i = i + 1
        if i >= n:
            i = i + 1
            break
    print(i)
elif x <= 0:
    print(1)

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

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

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

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

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

d = 0
i = 0
if x > 0:
    while d <= x:
        d = d + l[i]
        i = i + 1
        if i >= n:
            break
    if d > x:
        print(i)
    elif d <= x:
        print(n+1)
elif x <= 0:
    print(1)

Verdicts: Runtime Error

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

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+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):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break
print(cnt)


import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    # print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    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())
Ls = map(int, input().split())

count = 0
position = 0
for i in range(N):
    if X<position:
        break
    else:
        count += 1
        position += Ls[i]

print(count)

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

count = 0
position = 0
for i in range(N):
    if X<position:
        break
    else:
        count += 1
        position += Ls[i]

if X<position:
    pass
else:
    count += 1

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 = [int(x) for x in input().split()]
k = 0
ans = 1
for li in input().split():
    k += li
    ans += k <= x

print(ans)

n, x = [int(x) for x in input().split()]
k = 0
ans = 1
for li in input().split():
    k += int(li)
    ans += k <= x

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())
l = list(map(int, input().split()))
cnt = 0

for i in range(1,n+1):
  if sum(l[:i-1]) <= x:
    cnt += 1
    print(sum(l[:i-1]))
print(cnt)

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

for i in range(2,n+2):
  if sum(l[:i-1]) <= x:
    cnt += 1
    
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):
def main():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    sum = 0
    for idx, i in enumerate(l):
        sum += i
        if sum > x:
            print(idx + 1)
            break
        else:
            print(n + 1)

if __name__ == '__main__':
    main()

def main():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    sum = 0
    for idx, i in enumerate(l):
        sum += i
        if sum > x:
            print(idx + 1)
            break
    else:
        print(n + 1)

if __name__ == '__main__':
    main()

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):
a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
d=0
e=0
for i in range(a):
  while d<b:
    d=d+c[i]
    e=e+1
  print(e+1)
  break

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

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

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

Verdicts: Wrong Answer

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):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
no=0
for i in range(0,a[0]):
    if b[i]<=a[1]:
        no+=1 
print(no)        

a=list(map(int,input().split()))
b=list(map(int,input().split()))
no=1
for i in range(1,a[0]):
    b[i]+=b[i-1]
for i in range(0,a[0]):
    if(a[1]>=b[i]):
        no+=1
    else:
        break
print(no)        

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(_) for _ in input().split())
L = list(map(int, input().split()))
D = 0
ans = 1
while (D < X or ans < N):
    D += L[ans - 1]
    ans += 1
    print(D, ans)
if D == X:
    print(ans)
else:
    print(ans - 1)

N, X = (int(_) for _ in input().split())
L = list(map(int, input().split()))
D = [0 for i in range(N + 1)]
ans = 0
for i in range(N):
    D[i + 1]= D[i] + L[i]
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):
# -*- coding: utf-8 -*-


from sys import stdin

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

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

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

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

print(count)

# -*- coding: utf-8 -*-


from sys import stdin
import itertools


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

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

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

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

print(count)

# -*- coding: utf-8 -*-


from sys import stdin
import itertools



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

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

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

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

print(count)

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

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

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

d = 0
for i, l in enumerate(input().split()):
  d += int(l)
  if d > x:
    print(i + 1)
    break
else:
  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())
L=list(map(int, input().split()))

d = 0
count = 0

跳ねる直前からスタート

for i in range(1, N+2):
  if d <= X:
    count = count + 1
    d = d + L[i-1]

print(count)

N,X=map(int, input().split())
L=list(map(int, input().split()))
distance = 0
count = 0
while distance <= X and count < N:
  print(distance)
  distance = distance + L[count]
  count = count + 1

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


d = 0
count = 0



for i in range(1, N+2):
  if d <= X:
    count = count + 1
    d = d + L[i-1]

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):
_input1 = input()
_input2 = input()
N, X = tuple([int(a) for a in _input1.split(' ')])
l_list = [int(a) for a in _input2.split(' ')]

length = 0
cnt = 0

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

if length > X:
    cnt += 1

print(cnt)


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

length = 0
cnt = 0

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

if length <= X:
    cnt += 1

print(cnt)


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

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

print (cnt)

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

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

print (cnt)

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

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

print (cnt)

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

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

print (cnt)

Verdicts: 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):
s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d =< X:
  d += L[a]
  a += 1 
print(a)
  

s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d <= X:
  if a >= N+1:
    a = N
    break
  d += L[a]
  a += 1 

print(a+1)
  

s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d <= X:
  while a <= N+1:
    d += L[a]
    a += 1 

print(a)
  

s = list(map(int,input().split()))
N = s[0]
X = s[1]
L = list(map(int,input().split()))
a = 0
d = 0
while d <= X:
  if a >= N:
    a = N+1
    break
  else:
    d += L[a]
    a += 1 

print(a)
  

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

N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
count = 1
for i in range(N):
    D += L[i]
    if D<=X:
        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 = [int(i) for i in input().split()]
Ls = [int(l) for l in input().split()]
d = 0
res = 0
for i, Li in enumerate(Ls):
    print("i=", i+1, "Li=", Li, "d=", d)
    if d <= X and i < N:
        res += 1
        d += Li
    else:
        break
print(res)

N, X = [int(i) for i in input().split()]
Ls = [int(l) for l in input().split()]
d = 0
res = 1
for i, Li in enumerate(Ls):
    if d <= X and i < N:
        res += 1
        d += Li
    else:
        break
print(res)

N, X = [int(i) for i in input().split()]
Ls = [int(l) for l in input().split()]
d = 0
res = 1
for i, Li in enumerate(Ls):
    res += 1
    if d > X:
        break
    d += Li
print(res)

N, X = [int(i) for i in input().split()]
Ls = [int(l) for l in input().split()]
d = 0
res = 1
for i, Li in enumerate(Ls):
    if d <= X:
        res += 1
        continue
    d += Li
print(res)

N, X = [int(i) for i in input().split()]
Ls = [int(l) for l in input().split()]
d = 0
res = 1
for i, Li in enumerate(Ls):
    d += Li
    if d > X:
        break
    res += 1
print(res)

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

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)
    exit()
  c+=1
  if l==x:
    print(c)
    exit()
print(c)

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):
arr1 = input().split()
n,x = int(arr1[0]),int(arr1[1])

arr2 = input().split()

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

arr1 = input().split()
n,x = int(arr1[0]),int(arr1[1])

arr2 = input().split()

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

import sys
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)
        sys.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()))
val = 0
count = 0

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

n, x = map(int, input().split())
L = list(map(int, input().split()))
val = 0
count = 1

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

Verdicts: Wrong Answer

Accepted