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,　M = input().strip().split()
N,　M = [int(N),int(M)]

array = list(map(int, input().strip().split()))

sum = []

sum.append(array(0))

i = 1

while i < len(array):
	sum[i] = sum[i-1] + a[i]
  
j = 0

count = 0

while sum[j] <= M:
  	count =+ 1
    j =+ 1
    
print(count)
  	

i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while (d <= x) and (j < range(l)):
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x =i[1]

d = 0
count = 0
j = 0
while d < x:
  count =+ 1
  d = d + l[j]
  j =+ 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


i = list(map(int,input().split()))
n = i[0]
x =i[1]

d = 0
count = 0
j = 2

while i[j] < x:
  count =+ 1
  d = d + i[j]
  j =+ 1
  
  
print(count)

i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x = i[1]

d = 0
count = 0
j = 0

while (d <= x) and (j <= range(len(l))):
  count = count + 1
  d = d + l[j]
  j = j + 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


i = list(map(int,input().split()))
l = list(map(int,input().split()))
n = i[0]
x =i[1]

d = 0
count = 0
j = 0
while d <= x:
  count =+ 1
  d = d + l[j]
  j =+ 1
  

if count < n+1:
  print(count)
else:
  print(n+1)


N,M = input().strip().split()
N,M = [int(N),int(M)]
array = list(map(int, input().strip().split()))

sum = [array[0]]

i = 1

while i < len(array):
	sum[i] = sum[i-1] + a[i]
  
j = 0

count = 0

while sum[j] <= M:
  	count =+ 1
    j =+ 1
    
print(count)
  	

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

d = 0
count = 1

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

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

d = 0
count = 0

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

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

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

print(count)


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

count = 1
length = 0
for i in range(N):
    length += L[i]
    if length > X:
        print(count)
        exit()
    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):
# -*- coding: utf-8 -*-

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

h = 0  # place

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

    if h > x:
        print(i+1)
        break

print(i+2)


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

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

h = 0  # place
f = 1

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

    if h > x:
        f = 0
        break

print(1+i+f)


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
sum = 0

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

print(ans)



# -*- Coding: utf-8 -*-
N, X = map(int, input().split())
L = list(map(int,input().split()))

index = 0
Sum = 0
while Sum <= X:
    Sum += L[index]
    index += 1

print(index+1) 


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

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

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

pos, jumps, count = 0, 0, 0
while pos <= x and jumps < n:
    pos += nums[jumps]
    jumps += 1
    print(pos)

print(jumps)

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

pos, jumps, count = 0, 0, 1
while jumps < n:
    pos += nums[jumps]
    if pos <= x:
        count += 1
    jumps += 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
zahyou=0
for i in range(n):
  while zahyou<=x:
    cnt+=1
    zahyou+=l[i]
print(cnt)

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

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


N, X = map(int,input().split())
L = list(map(int,input().split()))
D = [0] * (N+1)
count = 1
D[0] = 0
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):
# ABC130B

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


# ABC130B

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




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


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




n,x = map(int,input().split())
l = list(map(int,input().split()))
d = [0]

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

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

print(ans)




Verdicts: 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
d=[0]*n
for i in range (1,n):
    d[i]=d[i-1]+l[i-1]
    if d[i]<=x:
        ans=ans+1
    else:
        break
print(ans)


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


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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

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

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: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):
d = 0
d <= 1000
i = 1

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

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

L = [s for s in input().split()]

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	print(D_pre)
	
	if(D_pre <= factor_2):
		count += 1

print(count)

factor_1, factor_2 = list(map(int, input().split()))

L = [s for s in input().split()]

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	print(D_pre)
	
	if(D_pre <= factor_2):
		count += 1

print(count)


factor_1, factor_2 = list(map(int, input().split()))

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

print(L)

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	if(D_pre <= factor_2):
		count += 1

print(count)


factor_1, factor_2 = list(map(int, input().split()))

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

D_pre = 0
count = 0

if(D_pre <= factor_2):
	count += 1


for i in range(len(L)):
	D_pre = D_pre + int(L.pop(0))
	
	if(D_pre <= factor_2):
		count += 1

print(count)


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):
count=0
d=0
i=0
while d<=x:
    if i==0:
        d=0
        if d<=x:
            count=1
        i+=1
    elif count<=n+1:
        d=d+int(a[i-1])
        if d<=x:
            count+=1
            i+=1
    else:
        break;
print(count)

n,x=map(int,input().split())
a=list(input().split())
count=0
d=0
i=0

while d<=x:
    if i==0:
        d=0
        count=1
        i+=1
    elif count<=n+1 and i<n+1:
        d=d+int(a[i-1])
        if d<=x:
            count+=1
            i+=1
        else:
            break;
    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, limit = map(int, input().split())
bounce = int(input().split())
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+bounce[i])
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)


N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+i)
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)


N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(bounce[i]+i)
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)

N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+bounce[i])
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)


N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+int(bounce[i]))
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)


Verdicts: Runtime Error

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

c = 1
d = 0
for x in L:
    d = d + x
    if d <= X :
        ans += 1

print(ans)

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

ans = 1
sum_L = 0
for j in range(n):
    sum_L += sum_L + L[j]
    if sum_L <= x :
        ans += 1
    else :
        exit(0)
        print(ans)


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

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

for i in range(len(arr)-1):
    if i == 0:
        chk = 0
    else:
        chk = chk + arr[i]

    if chk <= x:
        count =+ 1
    else:
        print(count)
        exit()

 print(count)


n,x = map(int,input().split())
arr = list(map(int,input().split()))
chk = 0
cnt = 1
for i in range(len(arr)):
    chk = chk + arr[i]

    if chk <= x:
        cnt += 1
    else:
        print(cnt)
        exit()

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):
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 0
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            c+=1
print(c)


y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 1
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            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):
N,X = map(int, input().split())
L = list(map(int, input().split()))
D = L[0]
i = 2
while D <= X and i <= N:
    #print("D, X", D, X)
    D += L[i-1]
    i += 1

print(i)

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

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

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

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

zahyo = 0
i = 0
while(zahyo <= x):
    
    zahyo = zahyo + li[i]
    print(zahyo)
    
    if zahyo <= x:
        i = i+1
    if i == n:
        break

print(i+1)

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

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

zahyo = 0
i = 0
while(zahyo <= x):
    
    zahyo = zahyo + li[i]
    print(zahyo)
    
    if zahyo <= x:
        i = i+1

print(i+1)

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

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

zahyo = 0
i = 0
while(zahyo <= x):
    
    zahyo = zahyo + li[i]
    
    if zahyo <= x:
        i = i+1
    if i == n:
        break

print(i+1)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

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

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

print(ans)

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

d=[0]
ans=1
for i in range(1,n+1):
    d.append(d[i-1]+l[i-1])
    if d[i]<=x:
        ans+=1
    else:
        ans+=0

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
i=0
while(True):
  d+=l[i-1]
  i+=1
  if(!(d<x or i<=n)):
    break
print(i)

n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
i=0
while(True):
  d+=l[i]
  i+=1
  if(!(d<x or i<=n)):
    break
print(i)

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

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):
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i+1
    return i
y = makey(x1,x2)
print(y)


x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i
  return i+1
y = makey(x1,x2)
print(y+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=(int(x) for x in input().split())
list = input().split()
list = [int(s) for s in list]
list.insert(0,0)
z = 0
count = 0

for i in range(n+1):
    if z > x:
        break
    else:
        count = count + 1
        z = z + list[i]
        
print(count)


n,x=(int(x) for x in input().split())
list = input().split()
list = [int(s) for s in list]
list.insert(0,0)
z = 0
count = 0

for i in range(n+1):
    if z >= x:
        break
    else:
        count = count + 1
        z = z + list[i]
        
print(count)

n,x=(int(x) for x in input().split())
list = input().split()
list = [int(s) for s in list]
list.append(0)
d = 0
count = 0

for i in range(n+1):
    if d > x:
        break
    else:
        count = count + 1
        d = d + list[i]

print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

Submission attempts (in order):
n,x=map(int,input().split())
l=list(map(int,input().split()))
t=0
c=0
e=0
for i in range(n):
  t+=l[i]
  c+=1
  if t>x:
    e=c
print(e if e!=0 else len(l))

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

sumL = 0
count = 0

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


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

sumL = 0
count = 0

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

count = 1
i  = 0
d = 0

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

print(count)


N,X = list(map(int,input().split(' ')))
L = list(map(int,input().split(' ')))[:N]

count = 0
d = 0

for l in L:
#    print(d,end=' ')
    if (d <= X):
        count += 1
#print()
print(count)


N,X = list(map(int,input().split(' ')))
L = list(map(int,input().split(' ')))[:N]

count = 1
d = 0

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

print(count)


N,X = list(map(int,input().split(' ')))
L = list(map(int,input().split(' ')))[:N]
p = 0
count = 1
for l in L:
    p += l
    if p <= X:
        count += 1
print(count)


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

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

for x in range(0, N):
    point+=L[x]
    if(point<=X):
        count+=1
    if(point>=X):
        print(count)
        sys.exit

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


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

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


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

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

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

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

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

if now <= X:
    a += 1


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

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

if now <= X:
    a += 1

print(a)

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

ans = 0
d = 0
d_ = 0
for i in range(1, n+1):
    if i == 1:
        ans += 1
        continue
    else:
        d = d_ + l[i-1]

    d_ = d
    ans += 1

    if d > x:
        break

print(ans)

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

    print(ans)

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

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

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

ans = 0
jmp = 0
for i in l:
    if jmp == 0:
        jmp = i
    else:
        jmp += i
    
    if jmp >= x:
        print(ans)
        break

    ans += 1

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

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


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

ans = 1
d = 0
for i in range(1, n+1):
    d += l[i-1]
    if d <= x:
        ans += 1
    else:
        break

print(ans)

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

for i in range(n):
    if i != 0:
        if hplace >= x :
            break
    hplace += l[i-1]

print(str(i+1))


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

for i in range(n):
    if i != 0:
        if hplace > x :
            break
    hplace += l[i-1]

print(str(i+1))


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


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

jump = 0
count = 1
for i in l:
    jump += i
    if jump <= x:
        count += 1
    else :
        break
print(str(count))


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())
steps = list(int,input().split())
 
x = 0
count = 1

for i in steps:
    x += i
    if x <= X:
        count += 1
 
print(count)

N, X = map(int, input().split())
steps = list(map(int,input().split()))
 
x = 0
count = 1

for i in steps:
    x += i
    if x <= 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()))

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

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


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

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

print(counter)

n,x= input().split()
b_list= list(map(int, input().split()))
temp = 0
counter = 0
for i in range(int(n)):
    temp += b_list[i]
    if (temp<=int(x)):
        counter +=1

    else:
        break

print(counter)


n,x= int(input().split())
b_list= list(map(int, input().split()))
temp = 0
counter = 0
for i in b_list:
    if (temp<=x):
        counter +=1
    temp += i

print(counter)


n,x= input().split()
b_list= list(map(int, input().split()))
temp = 0
counter = 1
for i in range(int(n)):
    temp += b_list[i]
    if (temp<=int(x)):
        counter +=1
    else:
        break

print(counter)

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


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

while num <= N+1:
  if D >= X:
    print(num)
    break
  D = D + L[num-1]
  num += 1
else:
  print(N)

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

D = 0
num = 1

while num <= N:
  D = D + L[num-1]
  if D > X:
    print(num)
    break
  num += 1
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):
import sys
input = sys.stdin.readline
def print_ans(N, X, lr):
    """Test Case
    >>> print_ans(3, 6, [3, 4, 5])
    2
    >>> print_ans(4, 9, [3, 3, 3, 3])
    4
    """
    counter = 1
    ans_sum = 0
    for l in lr:
        if ans_sum > X:
            break
        counter += 1
        ans_sum += l
    print(ans_sum)


if __name__ == '__main__':
    N, X = map(int, input().rstrip().split())
    lr = list(map(int, input().rstrip().split()))
    print_ans(N, X, lr)




import sys
input = sys.stdin.readline
def print_ans(N, X, lr):
    """Test Case
    >>> print_ans(3, 6, [3, 4, 5])
    2
    >>> print_ans(4, 9, [3, 3, 3, 3])
    4
    """
    counter = 0
    ans_sum = 0
    for l in lr:
        ans_sum += l
        if ans_sum > X:
            break
        else:
            counter += 1
    print(counter)

if __name__ == '__main__':
    N, X = map(int, input().rstrip().split())
    lr = list(map(int, input().rstrip().split()))
    print_ans(N, X, lr)




import sys
input = sys.stdin.readline
def print_ans(N, X, lr):
    """Test Case
    >>> print_ans(3, 6, [3, 4, 5])
    2
    >>> print_ans(4, 9, [3, 3, 3, 3])
    4
    """
    counter = 1
    ans_sum = 0
    for l in lr:
        if ans_sum > X:
            break
        counter += 1
        ans_sum += l
    print(counter)

if __name__ == '__main__':
    N, X = map(int, input().rstrip().split())
    lr = list(map(int, input().rstrip().split()))
    print_ans(N, X, lr)




import sys
input = sys.stdin.readline
def print_ans(N, X, lr):
    """Test Case
    >>> print_ans(3, 6, [3, 4, 5])
    2
    >>> print_ans(4, 9, [3, 3, 3, 3])
    4
    """
    counter = 1
    ans_sum = 0
    for l in lr:
        ans_sum += l
        if ans_sum > X:
            break
        else:
            counter += 1
    print(counter)

if __name__ == '__main__':
    N, X = map(int, input().rstrip().split())
    lr = list(map(int, input().rstrip().split()))
    print_ans(N, X, lr)




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):
import itertools
N,X = list(map(int,input().split()))
L = list(map(int,input().split()))
L = list(itertools.accumulate(L))
cnt = 0
for l in L:
    if X < L:
        print(cnt)
        exit()
    cnt += 1
print(cnt)

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

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

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

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

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

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

zahyo = 0
count = 1

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

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

zahyo = 0
count = 1

for i in range(1, n+1):
    zahyo = zahyo + l[i-1]
    if zahyo <= 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()))
tmp=0
ans=0
for i in range(N):
	if tmp>X:
		print(ans)
		break
	else:
		tmp+=L[i]
		ans+=1
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

Submission attempts (in order):
# -*- coding: utf-8 -*-

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

D=0
ans = len(L_list) + 1

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

print(ans)


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

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

D=0
ans = len(L_list) + 1

cnt=1
for i in range(N):
    D = D + L_list[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):

N,X = map(int,input().split())
L = list(map(int,input().split()))
land = [0]
for i in range(N):
    land.append(land[-1]+L[i])
land.sort()
count = 0
for l in land:
    if land <= X:
        count+=1
        
print(count)


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


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


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):
# B - Bounding

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

print(cnt)


# B - Bounding

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

N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = 0
count = 1
for n in L:
    if D > X or count > N + 1:
        break
    D += n
    count += 1
print(count)

N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = 0
count = 1
for n in L:
    D += n
    if D > X or count > N + 1:
        break
    count += 1
print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: A ball will bounce along a number line, making N + 1 bounces. It will make the first bounce at coordinate D_1 = 0, and the i-th bounce (2 \leq i \leq N+1) at coordinate D_i = D_{i-1} + L_{i-1}.  How many times will the ball make a bounce where the coordinate is at most X?

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

ns=0
ans = 1

for i in range(n):
  ns += l[i]
  if ns <= x:
    ans++
  else:
    break
print(ans)  

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

ns=0
ans = 1

for i in range(n):
	ns += l[i]
	if ns <= x:
		ans += 1
	else:
		break
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()))
count = 0
location = 0
for i in range(N):
    if location + L[i] <= X:
        count += 1
        location += L[i]
    else:
        break
print(count)


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


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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted