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()))
s=0
summy=1
for i in l:
    s=int(i)+s
    print(s)
    if x>=int(s):
        summy+=1
print(summy)

n,x=map(int,input().split())
l=list(map(int,input().split()))
s=0
summy=1
for i in l:
    s=int(i)+s
    if x>=int(s):
        summy+=1
print(summy)

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

N,X = (int(i) for i in input().split()) 
L = [int(i) for i in input().split()] 
D=0
i=0
while(D<=X):
  D=D+L[i]
  i=i+1
if X=0:
  print(1)
else:
  print(i)

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

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

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

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

n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  else:
    li.append(D)
    
if max(li) > x:
  print(n+1)
else:
  print(c)

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

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

n,x=map(int,input().split())
L=list(map(int,input().split()))
D=[0]*(n+1)
o=True
for i in range(n):
    D[i+1]=D[i]+L[i]
for i in range(len(D)):
    if D[i]>x:
        print(i)
        o=False
        break
if o:
    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 = (input().split())
L = list(map(int, input().split()))
x = int(X)
n = int(N)
position = 0
count = 0
while position <= x:
    position += L[count]
    count += 1
if n+1 < count:
    print(count)
else:
    print(n+1)

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

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

print(bnd-1)

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

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

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

print(bnd-1)

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

print(bnd-1)

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

print(bnd)

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

Verdicts: Wrong Answer

Wrong Answer

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

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


count_total = 0

now = 0
  
for count in range(N):
  
	while now <= X:
		now = now + length[count]
		count_total = count_total + 1
  
print(count_total)
  


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

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


count_total = 1

now = 0
  
for count in range(N):
  
  now = now + length[count]
  if now <= X:
    count_total = count_total + 1

print(count_total)
  

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()))
sum=0
T=True
for i in range(N):
    sum+=L[i]
    if sum>X:
        break
    T=False
if T:
    print(i+1)
else:
    print(i+2)

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

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

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

Verdicts: 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 = input().split()
for i in range(n):
    l[i] = int(l[i])

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


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

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

for i in range(1, N + 1):
    D_list.append(D_list[i - 1] + L_list[i - 1])

for i in range(N):
    if X < D_list[i]:
        print(i)
    elif X == D_list[i]:
        print(i + 1)
    else:
        print(0)



N, X = map(int, input().split())
L_list = list(map(int, input().split()))
D_list = [0]

for i in range(1, N + 1):
    D_list.append(D_list[i - 1] + L_list[i - 1])

for i in range(N):
    if X < D_list[i]:
        print(i)
    elif X == D_list[i]:
        print(i + 1)
    else:
      print(0)



N, X = map(int, input().split())
L_list = list(map(int, input().split()))
D_list = [0]

for i in range(1, N + 1):
    D_list.append(D_list[i - 1] + L_list[i - 1])

for i in range(N + 1):
    if X < D_list[i]:
        print(i)
        exit()
    elif X == D_list[i]:
        print(i + 1)
        exit()

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

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

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

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

print(bound)

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

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

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

counter = 0
for i in bound:
    if 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):
N, X = map(int, input().split())
num = input().split()
cnt = 1
cal = 0
for range in (N):
  cal += int(num[N])
  if cal <= X:
    cnt +=1
  else:
    break
print(cnt)


N, X = map(int, input().split())
num = input().split()
cnt = 1
cal = 0
for x in range (N):
  cal += int(num[x])
  if cal <= X:
    cnt +=1
  else:
    break
print(cnt)


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(i) for i in input().split())
L = [int(i) for i in input().split()] 
result = 0
D = 0
for i in range(N + 1):
    if D <= X:
        result += 1
    if i != N:
        D += L[i]
print(result)

N,x = (int(i) for i in input().split())
L = [int(i) for i in input().split()] 
result = 0
D = 0
for i in range(N + 1):
    if D <= X:
        result += 1
    D += L[i]
print(result)

N,X = (int(i) for i in input().split())
L = [int(i) for i in input().split()] 
result = 0
D = 0
for i in range(N + 1):
    if D <= X:
        result += 1
    if i != N:
        D += L[i]
print(result)

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

za = 0


for count in range(N):
  za += l[count]
  if za > X:
    break

print(count+1)

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

za = 0


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

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

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

dis = 0

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

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

#print(n)
#print(x)

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

#print(l)

dis = 0

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

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

#print(n)
#print(x)

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

#print(l)

dis = 0

for i in range(n):
  dis += l[i]
  #print(dis)
  if dis > x:
    print(i)
    break

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

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

dis = 0
cnt = 1

for i in range(n):
	dis += l[i]
	cnt += 1
	if dis > x:
		cnt += -1
		break
        
print(cnt)   

Verdicts: Runtime Error

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

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

a=0
for i in range(N+1):
    a+=i
    if a > X:
        ans=i
        break

print(i)
        

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

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

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

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


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


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

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


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 = input().split()
n,x = int(n), int(x)
L = [int(x) for x in input().split()]

D = [0 for _ in range(N)]

for i in range(1, N):
  D[i] = D[i-1] + L[i-1]

res = [True if D[i] <= x else False for i in range(N)]

print(sum(res))

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

D = [0 for _ in range(n + 1)]

for i in range(1, n + 1):
  D[i] = D[i-1] + L[i-1]

res = [True if D[i] <= x else False for i in range(n + 1)]

print(sum(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()))
x = 0

for i in range(N):
    if x > X:
        print(i)
        break
    else:
        x += L[i]
if x-L[len(L)-1] <= X:
    print(N)
    

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

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

for i in range(N):
    if d > X:
        print(i)
        break
    else:
        d += L[i]
if d >X and d-L[len(L)-1] <= X:
    print(N)
    

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

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

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

if d > X and d-L[len(L)-1]<=X:
    print(N)

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

L = list(map(int,input().split()))
d = 0
ans = 0

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


Verdicts: 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()))
S = [0]

i = 0
while i <= N:
  S.append(S[i-1]+L[i])
  i += 1
  
print(S)
  

N, X = map(int, input().split())
L = list(map(int, input().split()))
S = [0]
c = 0

i = 0
while i <= N-1:
  S.append(S[i]+L[i])
  i += 1
  
j = 0
while j <= N:
  if S[j]<= X:
    c += 1
    j += 1
  
  else:
    j += 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())
l = list(map(int, input().split()))

int d = 0;
for i in range(n):
  if d < x:
    d += l[i]
  else:
    break
    
print(i)
  

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

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

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=[]
for i in range(N):
	a.append(list(map(int,input().split())))
n=0
d=0
while n<=N:
	if d>X:
		break
	else:
		d=d+a[n]
		n=n+1

print(n+1)

N,X=map(int,input().split())
a=[]
for i in range(N):
	a.append(map(int,input().split()))
n=0
d=0
while n<=N:
	if d>X:
		break
	else:
		d=d+a[n]
		n=n+1

print(n+1)

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

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


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

bound = 0
ans = 1

for i in d:
    bound += i
    if bound >x:
        break
    ans += 1
print(ans)

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

bound = 0
ans = 1

for i in d:
    bound += i
    if bound >x:
        break
        ans += 1
print(ans)

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

count = 0
sum = 0

while sum <= x:
  sum += l[count]
  count+=1
print(count + 1)

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

count = 0
sum = 0

while sum <= x:
  sum += l[count]
  count+=1
print(count + 1)

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

count = 0
sum = 0

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

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

count = 0
sum = 0

while sum <= x:
  sum += l[count]
  count++
print(count + 1)

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

count = 0
sum = 0

while sum <= x:
  sum += l[count]
  count+=1
print(count + 1)

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

count = 0
sum = 0

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

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

count = 0
sum = 0

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

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

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

print(D)

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

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


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

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

print(D)


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

for i in L:
    D = D + i
    if D > X:
        break
    else:
        ans += 1

print(ans)


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

ans = 0
cnt = 0
if x > l[0]:
  print('1')
  exit()
for i in range(n):
  
  
  cnt += l[i]
  ans += 1
  if cnt > x:
    print(ans)
    exit()
  elif cnt == x:
    print(ans + 1)
    exit()
  
  #print(cnt)
  #print(ans)
print(n)


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

ans = 0
cnt = 0
for i in range(n):
  cnt += l[i]
  ans += 1 

  if cnt > x:
    print(ans)
    exit


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

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

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

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

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

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

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

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

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

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

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

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

dist = 0
cnt = 0
for i in range(N):
  if dist <= X:
    dist += list[i]
    cnt += 1
  else:
    break;
    
print(cnt)

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

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


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):
a=list(map(int,input().split()))
L=list(map(int,input().split()))
N=a[0]
X=a[1]
l=[0]
n=0
n1=0
while True:
    l.append(L[n]+l[n])
    n=n+1
    if n==N:
        break
print(l)
while True:
    if l[n1]<=X:
        n1+=1
    else:
        print(n1)
        break
    if n1==N:
        if X>=l[-1]:
            print(n1+1)
            break
        else:            
            print(n1)
            break

a=list(map(int,input().split()))
L=list(map(int,input().split()))
N=a[0]
X=a[1]
l=[0]
n=0
n1=0
while True:
    l.append(L[n]+l[n])
    n=n+1
    if n==N:
        break
while True:
    if l[n1]<=X:
        n1+=1
    else:
        print(n1)
        break
    if n1==N:
        if X>=l[-1]:
            print(n1+1)
            break
        else:            
            print(n1)
            break

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

k = []
s = []
for i in range(n):
  k[i] += l[i]
  s[i] = k[i]

c = 0
for i in s:
  if i <= x:
    c += 1

print(c)

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

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

k = 0
s = []
for i in range(n):
  k += l[i]
  s.append(k)

c = 0
for i in s:
  if i <= x:
    c += 1

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

print(ans)

# -*-coding: utf-8 -*-
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
i = 1
while D <= X:
    D += L[i-1]
    i += 1
    if i == N:
        i += 1
        break
print(i-1)

# -*-coding: utf-8 -*-
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = 0
for i in range(1, N+1):
    D += L[i-1]
    # print(i+1, D)
    if D > X:
        ans = i
        break
    if i == N:
        ans = i+1

print(ans)

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()))
NOW = 0
c = 1
for i in L:
  if NOW > X:
    break
  NOW += i
  c += 1
print(c)

N,X = map(int,input().split())
L = list(map(int,input().split()))
NOW = 0
c = 1

for i in L:
  if NOW + i <= X:
    NOW += i
    c += 1
  else:
    break
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):
n,k=map(int, input().split(' '))
a=list(map(int, input().split(' ')))
ans,s=0,0
for i in a:
  if(s<=k) ans+=1
  else break
  s+=i
print(ans)


n,k=map(int, input().split(' '))
a=list(map(int, input().split(' ')))
ans,s=0,0
for i in a:
  if s<=k: ans+=1
  else break
  s+=i
print(ans)

n,k=map(int, input().split(' '))
a=list(map(int, input().split(' ')))
ans,s=0,0
for i in a:
  if s<=k: ans+=1
  else: break
  s+=i

if s<=k: ans+=1
print(ans)

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

l = []
cnt = 0
l.append(int(0))
for i in range(N):
  l.append(l[i]+L[i])
  if l[i] <= X:
    cnt += 1
if l[-1] <= X:
  cnt += 1
print(l)
print(cnt)
  


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

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

for i in l:
  d+=i
  if d<=x:
    ans+=1
  else:
    break
print(ans)


n,x=map(int,input().split())
l=list(map(int,input().split()))
ans,d=1,0

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

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

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

print(d)
print(count) 

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

count = 1
d = [0] * (N+1)
for i in range(1, N+1):
    d[i] = d[i-1] + L[i-1]
    if d[i] <= 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()))
cnt=0
d=[0 for _ in range(n+1)]
d[0]=0
for i in range(1,n+1):
    d[i]=d[i-1]+l[i-1]
    if d[i]<=x:
        cnt+=1
print(cnt)

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

n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
i=0
p=0
while i<n:
    p=p+l[i]
    if p>x:
        break
    i+=1
print(i+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()))
#print(L)
D=0
B=[0]
C=[]
for i in range(len(L)):
  D=D+L[i]
  B.append(D)
print(B)
for i in range(len(L)):
  if B[i]<=x:
    C.append(i)
  else:
    pass
print(C)
print(min(n+1,len(C)))

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

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



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):
  d += L[i]
  if X < d:
    print(i + 1)
    break
  else:
    print(N + 1)


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

x = 0
cnt = 0

for length in L:
    cnt += 1
    x += length
    print(cnt, x)
    if x > X:
        break

print(cnt)



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



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

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

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

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

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

print(count)

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

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

print(count)
    

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

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

print(count)

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

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

Verdicts: Runtime Error

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

n,x=list(map(int, input().split(" ")))
L=list(map(int, input().split(" ")))
m=0
sum=0
for l in L:
    sum+=l
    m+=1
    if sum>x:
        break
m=max(m,n+1)
print(m)

n,x=list(map(int, input().split(" ")))
L=list(map(int, input().split(" ")))
count,sum=1,0
for l in L:
    sum+=l
    if sum>x:
        break
    count+=1

print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted