ZhenlongDai/ACPR huggingface dataset:
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x =map(int,input().split())
l1=list(map(int,input().split()))
l2=[0]
for i in range(len(l1)):
  l2.append(sum(l2)+l1[i])
ans=0
i=0
while i<len(l2):
  if l2[i]<x:
    ans+=1
  i+=1
print(ans)

Failing test case input:
4 6
3 3 0 1

Expected output:
4


Actual output:
2


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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
1 9
4 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x=list(map(int,input().split()))
num=0
c=0
l=list(map(int,input().split()))
for i in range(n):
    num+=1
    c=c+l[i]
    if c>x:
        break
print(num)

Failing test case input:
0 12
51 9 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n,x=list(map(int,input().split()))
num=1
c=0
l=list(map(int,input().split()))
for i in range(n):
    c=c+l[i]
    if c>x:
        break
    num+=1
print(num)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N, X = map(int, input().split())
    lst = list(map(int, input().split()))
    lst = sorted(lst)
    cnt = 0
    s = 0
    for i in range(N):
        if s <= X:
            cnt += 1
        s += lst[i]
    print(cnt)
main()

Failing test case input:
4 9
3 6 3 3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
def main():
    N, X = map(int, input().split())
    lst = list(map(int, input().split()))
    cnt = 1
    s = 0
    for i in range(N):
        s += lst[i]
        if s <= X:
            cnt += 1
    print(cnt)
main()

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    N,X = map(int,input().split())
    L=[int(i) for i in input().split()]
    Ls = 0
    count = 1
    for i in range(N):
        Ls = Ls+L[i]
        print(Ls)
        if Ls<=X:
            count+=1
    print(count)


if __name__ == '__main__':
    main()

Failing test case input:
2 14
7 18 1 2

Expected output:
2


Actual output:
7
25
2


Fixed submission (verdict: Accepted):

def main():
    N,X = map(int,input().split())
    L=[int(i) for i in input().split()]
    Ls = 0
    count = 1
    for i in range(N):
        Ls = Ls+L[i]
        
        if Ls<=X:
            count+=1
    print(count)


if __name__ == '__main__':
    main()
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
e = 1
for i in l:
  
  if d + i <= x:
    e += 1
    d = d + i
print(e)

Failing test case input:
0 10
22 0 2 17

Expected output:
1


Actual output:
3


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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inp_1 = input().split()
n = int(inp_1[0])
x = int(inp_1[1])
l_in = input().split()

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




Failing test case input:
4 8
4 6 1 3

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
inp_1 = input().split()
n = int(inp_1[0])
x = int(inp_1[1])
l_in = input().split()

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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
 
nums = list(map(int,input().split()))

s=0
count=1
for val in range(len(nums)):
    if s+nums[val] <= x:
        s += nums[val]
        count += 1
    
print(count)

Failing test case input:
3 6
7 1 5

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
 
nums = list(map(int,input().split()))
 
s=0
count=1
for val in range(len(nums)):
    s = s+nums[val]
    if s <= x:
        count += 1
    
print(count)

Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
d = 0
for i in b:
  d += i
  if d <= a[1]:
    c += 1
print(c)

Failing test case input:
1 14
7 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 1
d = 0
for i in b:
  d += i
  if d <= a[1]:
    c += 1
print(c)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 0
for i in l:
    if d <= x:
        d += i
        cnt+= 1
    
    else:
        cnt -= 1
        print(cnt)
        exit()
    
print(cnt)

Failing test case input:
4 6
3 3 3 1

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
cnt = 1
for i in l:
    d += i
    if d <= x:
        
        cnt += 1

print(cnt)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = list(map(int, input().split()))


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

print(cnt)


Failing test case input:
4 6
3 3 3 1

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = list(map(int, input().split()))


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

print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
1 9
4 10 2 6

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
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
if S <= X:
    print(N+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int,input().split())
L = input().split()
L = [int(i) for i in L]

bound_times = 0
now_point = 0
for i in L:
    if now_point > X:
        break
    now_point += i
    bound_times += 1
print(bound_times)

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N, X = map(int,input().split())
L = input().split()
L = [int(i) for i in L]

bound_times = 0
now_point = 0

for i in L:
    if now_point > X:
        break
    now_point += i
    bound_times += 1

if now_point <= X:
    bound_times += 1
    
print(bound_times)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int,input().split())

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


Failing test case input:
0 11
31 9 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
e = [int(i) for i in input().split()]
count = 0
d = 0
for i in range(N):
    count += 1
    d += e[i]
    if d > X:
        break

print(count)


Failing test case input:
0 11
51 0 2 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
e = [int(i) for i in input().split()]
count = 1
d = 0
for i in range(N):
    d += e[i]
    if d > X:
        break
    else:
        count += 1

print(count)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def input_from_console():
    n, x = map(int, input().split())
    l_list = list(map(int, input().split()))
    return n, x, l_list


def solve(n, x, l_list):
    result = 0
    position = 0
    for i in range(n):
        if position > x:
            return result
        result +=1
        position += l_list[i]
    return result



def main():
    n, x, l_list = input_from_console()
    print(solve(n, x, l_list))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  
        check_cases()
    else:
        main()


Failing test case input:
1 9
4 10 2 6

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
def input_from_console():
    n, x = map(int, input().split())
    l_list = list(map(int, input().split()))
    return n, x, l_list


def solve(n, x, l_list):
    result = 0
    position = 0
    for i in range(n):
        if position > x:
            return result
        result +=1
        position += l_list[i]
    if position > x:
        return result 
    else:
        return result + 1



def main():
    n, x, l_list = input_from_console()
    print(solve(n, x, l_list))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  
        check_cases()
    else:
        main()

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = [0 for _ in range(n + 1)]
for i in range(1, n + 1):
  d[i] = d[i - 1] + l[i - 1]
for j in range(n + 1):
  if d[j] >= x:
    print(j)
    exit()

Failing test case input:
1 9
4 10 2 10

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
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(n + 1):
  if d[j] <= x:
    ans += 1
print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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:
    break
  d = d + l[i]
  count = count + 1
  
    
if count > n:
  print(n+1)
else:
  print(count)

Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
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)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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

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

print(count)


Failing test case input:
1 9
4 10 2 15

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):

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

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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0] * (n + 1)
ans = 1

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

    if D[i] <= x:
        ans = ans + 1
    else:
        break

print(ans)

Failing test case input:
4 9
5 5 2 2

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0] * (n + 1)
ans = 1

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

    if D[i] <= x:
        ans = ans + 1
    else:
        break

print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
cumlate = [0]
for i in range(n):
    cumlate.append(cumlate[i] + l[i])
for i in range(n+1):
    if x < cumlate[i]:
        print(i)
        exit()


Failing test case input:
1 9
4 6 2 6

Expected output:
2


Actual output:

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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
l = list(map(int,input().split()))
m = 0
a = 0
for i in range(n):
    a+=l[i]
    if a<=x:
        m+=1

print(m)

Failing test case input:
1 9
4 10 1 2

Expected output:
2


Actual output:
1


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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
li = list(map(int, input().split()))
a = 0
i = 0
while a <= x and i < n:
  a += li[i]
  i += 1
print(i)
  

Failing test case input:
0 10
22 0 1 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
li = list(map(int, input().split()))
li.append(0)
a = 0
i = 0
while a <= x and i < n+1:
  a += li[i]
  i += 1
print(i)
Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,x=map(int,input().split())
Y = list(map(int,input().split()))
Z = [0]*n
a = 0
for i in range(n):
  a +=Y[i]
  Z[i]=a
import bisect
print(2+bisect.bisect_left(Z,x))

Failing test case input:
0 11
51 9 1 17

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n,x=map(int,input().split())
Y = list(map(int,input().split()))
Z = [0]*n
a = 0
for i in range(n):
  a +=Y[i]
  Z[i]=a
import bisect
print(1+bisect.bisect_left(Z,x+1))

Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X=map(int,input().split())

arr=list(map(int,input().split()))
a=0
ans=0

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

print(ans)

Failing test case input:
0 11
51 9 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N,X=map(int,input().split())

arr=list(map(int,input().split()))
a=0
ans=1

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

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

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


Failing test case input:
4 9
3 2 3 3

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):

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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
INPUT = list(map(int, input().split()))

N = INPUT[0]
X = INPUT[1]

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

count = 0 

i = 0
value = 0
while(i < N):
    if(value <= X):
        count += 1
        value += L[i]
    i += 1
print(count)

Failing test case input:
1 9
4 10 2 15

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
INPUT = list(map(int, input().split()))

N = INPUT[0]
X = INPUT[1]

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

vvv = 0
i = 0
while(vvv <= X):
    count += 1
    if(i >= N):
        break
    vvv += L[i]
    i += 1

print(count)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
l = list(map(int, input().split()))
dold=0
for i in range(len(l)):
    dold = dold + l[i]
    if dold > x:
        print(i+1)
        break

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
l = list(map(int, input().split()))
dold=0
for i in range(len(l)):
    dold = dold + l[i]
    if dold > x:
        print(i+1)
        break
else:
    print(n+1)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
*l, = map(int,input().split())
r = 0
ans =0
for i in l:
  if x>= r:
    ans += 1
  r += i
print(ans)
  

Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
*l, = map(int,input().split())
r = 0
ans =1
for i in l:
  r += i
  if x>= r:
    ans += 1
print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=[int(x) for x in input().split(' ')]
arr=[int(x) for x in input().split(' ')]
temp=0
for x in range(N):
  if arr[x]+temp>X:
    temp=x
    break
  else:
    temp+=arr[x]
print(temp+1)

Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:
9


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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = 0
ans = 0
for i in range(N):
    if d > X:
        print(ans)
        exit()
    ans += 1
    d += int(L[i])
print(ans)

Failing test case input:
0 6
51 0 1 6

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = 0
ans = 0
for i in range(N):
    if d > X:
        print(ans)
        exit()
    ans += 1
    d += int(L[i])
if d <= X:
    ans += 1
print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = [int(x) for x in input().split()]

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

Failing test case input:
0 10
15 0 1 1

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = [int(x) for x in input().split()]

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

print(ans)

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,X = map(int,input().split())
L = list(map(int, input().split()))

D = [0]
F = 0
for i in range(N):
    D.append(F+L[i])
    F = D[-1]

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

Failing test case input:
0 10
15 0 2 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
L = list(map(int, input().split()))
D = [0]

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

print(len(D))
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]
    if d > x :
        print(i)
        break

Failing test case input:
0 10
51 0 1 17

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = list(map(int, input().split()))

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

print(c)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X = map(int,input().split(" "))
L = list(map(int,input().split(" ")))
D = 0
ans = 1
for i in range(N):
  if D < X:
    ans += 1
    D += L[i]
  else:
    break

print(ans)


Failing test case input:
3 12
18 5 1 12

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N,X = map(int,input().split(" "))
L = list(map(int,input().split(" ")))
D = 0
ans = 1
for i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
    

print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=[0]
for i in L:
  D.append(D[-1]+i)
  if D[-1]>X:
    print(len(D)-1)
    break


Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=[0]
cnt=0
for i in L:
  D.append(D[-1]+i)
for i in D:
  if i<=X:
    cnt+=1
print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
l = list(map(int,input().split()))
result = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        result += 1
    else:
        print(result)
        exit()

Failing test case input:
0 10
22 0 2 17

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
l = list(map(int,input().split()))
result = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        result += 1
    else:
        print(result)
        exit()
print(result)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = (int(x) for x in input().split())
l=list(map(int,input().split()))
k=0
d=0

while d<=x:
   if len(l)<=k:
    break
   else:
    d=d+l[k]
    k=k+1
  
print(k)

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
n,x = (int(x) for x in input().split())
l=list(map(int,input().split()))
k=0
d=0

while d<=x:
   if len(l)<=k:
    break
   else:
    d=d+l[k]
    k=k+1
if d<=x:
  print(k+1)
else:print(k)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split(' '))
ls = [i for i in map(int, input().split(' '))]
sum, bound = 0, 0
for i in range(0, n):
    sum += ls[i]
    if sum > x:
        bound = i+1
        break
print(bound)

Failing test case input:
0 10
51 0 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, x = map(int, input().split(' '))
ls = [i for i in map(int, input().split(' '))]
sum, bound = 0, 1
for i in range(0, n):
    sum += ls[i]
    if sum > x:
        break
    else:
        bound += 1
print(bound)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
a = list(map(int, input().split()))
i = 0
cnt = 0

if a[0] > x:
    print(0)
else:
    while cnt <= x:
        cnt += a[i]
        i += 1
        if i == n:
            break
    print(i)    

Failing test case input:
0 10
51 0 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
a = list(map(int, input().split()))
L = []
d = 0
for i in range(n):
    d += a[i]
    L.append(d)

cnt = 0
for j in range(len(L)):
    if L[j] <= x:
        cnt+=1
    else:
        break

print(cnt+1)

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, X = map(int, input().split())
L = list(map(int, input().split()))
pref_sum = [0]*(N+1)
ans = 0

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

for s in pref_sum:
    if s <= X:
        ans += 1     
print(ans)

Failing test case input:
3 11
31 9 1 17

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = list(map(int, input().split()))
pref_sum = [0]*(N+1)
ans = 0

for i in range(N):
    pref_sum[i+1] = L[i]+pref_sum[i]



for s in pref_sum:
    if s <= X:
        ans += 1     
print(ans)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = list(map(int, input().split()))
 
cnt = 0
m = 0
while m <= X and cnt < N:
    m += L[cnt]
    cnt += 1

print(cnt)
        

Failing test case input:
0 10
15 0 4 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
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
print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
l = [int(i) for i in input().split()]
d = 0
count = 0
for i in range(n):
    if i == 0:
        d = 0
    else :
        d += l[i-1]
    if d <= x:
        count += 1
    else :
        break
print(count)

Failing test case input:
0 10
51 0 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
l = [int(i) for i in input().split()]
d = [0]
count = 1
for i in range(1,n+1):
    d.append(d[i-1]+l[i-1])
    if d[i] <= x:
        count += 1
print(count)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
Ls = list(map(int, input().split()))

kaisuu=0
kyori=0

for i in range(len(Ls)):
  kyori=kyori+Ls[i]
  kaisuu=kaisuu+1
  if kyori>X or kaisuu>N+1:
    break

print(kaisuu)

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
Ls = list(map(int, input().split()))

kaisuu=1
kyori=0

for i in range(len(Ls)):
  kyori=kyori+Ls[i]
  if kyori>X:
    break
  else:
    kaisuu=kaisuu+1

if kaisuu>N+1:
  kaisuu==N+1
    
print(kaisuu)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools 
n,x = list(map(int,input().split()))
l = list(map(int,input().split()))
k = list(itertools.accumulate(l))
if 0 not in k:
    k.append(0)
k.sort()
s = 0
ii = 0

for i in k:
    if(i>x):
        s = ii
        break
    ii+=1
print(s)

Failing test case input:
4 9
1 2 0 5

Expected output:
5


Actual output:
0


Fixed submission (verdict: Accepted):
import itertools 
n,x = list(map(int,input().split()))
l = list(map(int,input().split()))
k = list(itertools.accumulate(l))
k.append(0)
k.sort()
ii = 0
for i in k:
    if(i<=x):
        ii+=1
        continue
    else:
        break
print(max(1,ii))

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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)


Failing test case input:
0 11
51 0 1 17

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):


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)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
list_l = map(int, input().split())

total = 0

for lc,l in enumerate(list_l):
    total += l
    if (total > x):
        break

print(lc + 1)


Failing test case input:
4 9
4 0 -1 5

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
list_l = map(int, input().split())

total = 0

for lc,l in enumerate(list_l):
    total += l
    if (total > x):
        break

if (total <= x):
    lc += 1
print(lc + 1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = input().split()
L = input().split()
for i, l in enumerate(L):
  if i == 0:
    D = 0
  else:
    D = int(l) + D
    
  if D > int(x):
    print(i)
    break
    
  elif i+1 >= int(n):
    print(n)

Failing test case input:
3 12
16 9 1 3

Expected output:
1


Actual output:
3
3


Fixed submission (verdict: Accepted):
n, x = input().split()
L = input().split()
for i, l in enumerate(L):
  if i == 0:
    D = int(l)
  else:
    D = int(l) + D

    
  if D > int(x):
    print(i + 1)
    break
    
if D <= int(x):
  print(int(n) + 1)
Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))

cnt = 0
d = 0

while(x >= d):
  d += l[cnt]
  cnt += 1
  if cnt == n:
    break

print(cnt)

Failing test case input:
1 14
11 18 1 1

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = list(map(int, input().split()))

cnt = 1
d = 0

while(True):
  if cnt - 1 == n:
    break
  d += l[cnt - 1]
  if d > x:
    break
  cnt += 1

print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
t = 0

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


Failing test case input:
4 9
4 2 0 3

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = list(map(int, input().split()))
t = 0
c = 0

for i in range(len(l)):
    t += l[i]
    if x < t:
        print(i + 1)
        c += 1
        break

if c == 0:
    print(n + 1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())

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

d = [0]
for i in range(N):
    d.append(d[-1]+LLL[i])

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


Failing test case input:
1 9
4 10 2 6

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
















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

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

d = [0]
for i in range(len(LLL)):
    d.append(d[-1]+LLL[i])

for i in range(1, len(d)):
    if d[i] > X:
        print(i)
        exit()

print(N+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L=list(map(int, input().split()))

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

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

Failing test case input:
0 10
15 0 4 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L=list(map(int, input().split()))

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

print(count-1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())

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

d = 0
for i in range(N):
    d = d + LLL[i]
    if d > X:
        print(i+1)
        exit()


Failing test case input:
4 9
4 2 0 3

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
















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

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

d = [0]
for i in range(len(LLL)):
    d.append(d[-1]+LLL[i])

for i in range(1, len(d)):
    if d[i] > X:
        print(i)
        exit()

print(N+1)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x=map(int,input().split())
L=list(map(int,input().split()))
f=0
for i in range(n):
  if sum(L[a] for a in range(i))<=x:
    f+=1
print(f)

Failing test case input:
0 10
15 0 2 2

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n,x=map(int,input().split())
L=list(map(int,input().split()))
f=0
for i in range(n+1):
  if sum(L[a] for a in range(i))<=x:
    f+=1
print(f)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d = 0
    for i in range(1, n+1):
        d += l[i-1]
        if d >= x:
            print(i)
            quit()
    else:
        print(n)

if __name__ == '__main__':
    main()


Failing test case input:
1 9
4 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d = 0
    for i in range(1, n+1):
        d += l[i-1]
        if d > x:
            print(i)
            quit()
    else:
        print(n+1)

if __name__ == '__main__':
    main()

Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X = map(int,input().split())
l = list(map(int,input().split()))

sum=0
for i in range(N-1):
    if sum>X:
        print(i)
        exit()
    sum += l[i]


Failing test case input:
1 14
7 18 1 1

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
l=[0]
l += list(map(int,input().split()))
sum=0
for i in range(N+1):
    sum += l[i]
    if sum>X:
        print(i)
        exit()
print(N+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

num = 0
ct = 0

for i in range(len(l)):
    if num <= m:
        ct += 1
        num += l[i]
    else:
        break
    
print(ct)

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
n,m = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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

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

print(len(D))


Failing test case input:
0 11
31 9 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):

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

count = 1
d = 0
for i in range(n):
    d += L[i]
    if d <= x:
        count += 1
    else:
        break
print(count)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d = 0
    for i in range(1, n):
        d += l[i-1]
        if d >= x:
            print(i)
            quit()
    else:
        print(n)

if __name__ == '__main__':
    main()


Failing test case input:
4 9
4 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d = 0
    for i in range(1, n+1):
        d += l[i-1]
        if d > x:
            print(i)
            quit()
    else:
        print(n+1)

if __name__ == '__main__':
    main()

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X = map(int,input().split())

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

now = 0
ans = 0
for l in L:
    if now <= X:
        now += l
        ans += 1
    else:
        break
        
print(ans)

Failing test case input:
4 9
4 0 -1 5

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())

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

now = 0
LL = [now]
for l in L:
    now += l
    LL.append(now)
print(len(list(filter(lambda x:x<=X,LL))))

Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, x = (int(i) for i in input().split())
list_l = [int(j) for j in input().split()]
tmp = 0
count = 0
for i in range(0, n + 1):
    count += 1
    if i == 0: continue
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
print(count - 1)

Failing test case input:
0 10
22 0 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, x = (int(i) for i in input().split())
list_l = [int(j) for j in input().split()]
tmp = 0
count = 0
for i in range(0, n + 1):
    if i == 0:
        pass
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
    count += 1
print(count)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X = map(int,input().split())
list = input().split()
list = [int(i) for i in list]

count=0
ans=1

for i in list:
  count += i
  if count > X:
    print(ans)
    exit()
  ans += 1



Failing test case input:
4 9
4 2 0 3

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
list = input().split()
list = [int(i) for i in list]

count=0
ans=1

for i in list:
  count += i
  if count > X:
    print(ans)
    exit()
  ans += 1

print(ans)
Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,x=map(int,input().split())
List = [int(i) for i in input().split()]
d=0
j=1
for i in range(n):
    if d<=x :
        d=d+List[i]
        j+=1
    else :
        print(j)

Failing test case input:
0 10
15 0 4 1

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
n,x=map(int,input().split())
List = [int(i) for i in input().split()]
d=0
j=1
for i in range(n):
    d=d+List[i]
    if d<=x :
        j+=1
print(j)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
c = 0
for i in range(1, n + 1):
    if d <= x:
        c += 1
    else:
        break
    d += l[i - 1]
print(c)

Failing test case input:
0 10
51 0 1 17

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = list(map(int, input().split()))
d = 0
c = 1
for i in range(1, n + 1):
    d += l[i - 1]
    if d <= x:
        c += 1
    else:
        break
print(c)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x=map(int,input().split())
l=[int(i) for i in input().split()]
a=0
ans=0
for i in l:
  if a+i>x:
    print(ans+1)
    exit()
  ans+=1
  a+=i
print(ans)


Failing test case input:
4 9
4 0 -1 5

Expected output:
5


Actual output:
4


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

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 0
d = 0
for i in range(n):
    cnt += 1
    d += l[i]
    if d > x:
        break
print(cnt)

Failing test case input:
4 9
3 2 0 3

Expected output:
5


Actual output:
4


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

print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X = map(int,input().split())
L = list(map(int,input().split()))
D,i,cnt = 0,0,0
while(D <= X and cnt < N):
  D = D + L[i]
  cnt +=1
  i += 1
print(cnt)

Failing test case input:
1 9
4 10 2 9

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
L = list(map(int,input().split()))
L.append(0)
D,i,cnt = 0,0,0
while(D <= X and cnt <= N):
  D = D + L[i]
  cnt +=1
  i += 1
print(cnt)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = list(map(int,input().split()))
L = list(map(int,input().split()))

pointList = []
for i in range(len(L)):
  if i != 0:
    x = pointList[i-1]+L[i-1]
    pointList.append(x)
  else:
    pointList.append(0)
    
num = 0
    
for i in range(len(pointList)):
  if pointList[i]<=X:
    num += 1

print(num)

Failing test case input:
4 9
4 2 0 3

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N, X = list(map(int,input().split()))
L = list(map(int,input().split()))

pointList = [0]
for i in range(len(L)):
  x = pointList[i]+L[i]
  pointList.append(x)
    
num = 0
    
for i in range(len(pointList)):
  if pointList[i]<=X:
    num += 1

print(num)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
4 9
4 6 1 3

Expected output:
2


Actual output:
3


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



p = 0
count = 1

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

print(count)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

d = 0
for i,l in enumerate(L):
	d += l
	if d > x:
		print(i+1)
		break
	elif i==n-1:
		print(i+2)
		break
	d += l


Failing test case input:
4 6
3 3 0 1

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
line1 = input().split()
n = int(line1[0])
x = int(line1[1])
L = list(map(int,input().split()))

d = 0
for i,l in enumerate(L):
	d += l	
	if d > x:
		print(i+1)
		break
	elif i==n-1:
		print(i+2)
		break

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = list(map(int, input().split()))
j = list(map(int, input().split()))
d = 0
x = i[1]
for i in range(i[0]):
  d = d + j[i] 
  if d > x:
    print(i+1)
    break

Failing test case input:
0 6
51 0 1 17

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
i = list(map(int, input().split()))
j = list(map(int, input().split()))
d = 0
x = i[1]
y = i[0]
for i in range(i[0]):
  d = d + j[i] 
  if d > x:
    print(i+1)
    break

if d <= x:
  print(y+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = [0 for i in range(n)]
count = 1
for i in range(1, n):
    d[i] = d[i - 1] + l[i - 1]
    if d[i] <= x:
        count += 1
print(count)

Failing test case input:
1 9
4 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = [0 for i in range(n + 1)]
count = 1
for i in range(1, n + 1):
    d[i] = d[i - 1] + l[i - 1]
    if d[i] <= x:
        count += 1
print(count)
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=map(int,input().split())
L=list(map(int,input().split()))
count=0
length=0
while length<=X:
	length=length+L[count]
	count=count+1
	if count==N:
		break
print(count)

Failing test case input:
1 9
4 10 1 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))

    ans = 0
    D = 0
    for i in range(N):
        D = D + L[i]
        if D > X:
            break
        ans+=1
    return ans
    
if __name__ == '__main__':
    print(main())


Failing test case input:
4 9
3 6 2 6

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
def main():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
 
    ans = 1
    D = 0
    for i in range(N):
      D = D + L[i]
      if D <= X:
        ans+=1
        
    return ans
    
if __name__ == '__main__':
    print(main())

Problem: p03000
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k=map(int,input().split())
s=0
l=list(map(int,input().split()))
c=0
for i in range(n):
    s+=l[i]
    if(k<s):
        break
    c+=1
print(c)


Failing test case input:
3 12
16 9 1 3

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
s=0
l=list(map(int,input().split()))
c=1
for i in range(n):
    s+=l[i]
    if(k<s):
        break
    c+=1
print(c)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
i=1
cnt=0
while d<=x:
  cnt+=1
  d+=l[i-1]
  
print(cnt)

Failing test case input:
4 7
4 2 1 5

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
n,x=map(int,input().split())
l=list(map(int,input().split()))+[0]

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

  
print(cnt)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    n, x = map(int, input().split())

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

    result = 1
    D = 0

    for i in L:


        newD = D + i
        if newD <= x:
            result = result + 1
            D = newD
        


    return result

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

Failing test case input:
4 9
3 6 3 0

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):

def main():
    n, x = map(int, input().split())

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

    result = 1
    D = 0

    for i in range(0, n):
        Dn = D + L[i]

        if Dn <= x:
            result += 1

        D = Dn



    return result



if __name__ == "__main__":
    print(main())
Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N,X = map(int,input().split())

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


res = 0
i = 0
ans = 1
for i in range(N):
    res += li[i]

    if res > X:
        break
    

print(min(i+1,N+1))
    

Failing test case input:
1 9
4 6 2 6

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
N,X = map(int,input().split())

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


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

Problem: p03000
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from itertools import accumulate


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

print(L)
for i, l in enumerate(L):
    if l > X:
        print(i)
        exit()


Failing test case input:
3 12
16 5 1 12

Expected output:
1


Actual output:
[0, 16, 21, 22, 34]
1


Fixed submission (verdict: Accepted):
from itertools import accumulate


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

for i, l in enumerate(L):
    if l > X:
        print(i)
        exit()

print(len(L))

Problem: p03000
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X = map(int,input().split())
l = list(map(int,input().split()))

sum=0
for i in range(N-1):
    if sum>X:
        print(i)
        exit()
    sum += l[i]
print(N+1)


Failing test case input:
4 9
3 6 2 6

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
l=[0]
l += list(map(int,input().split()))
sum=0
for i in range(N+1):
    sum += l[i]
    if sum>X:
        print(i)
        exit()
print(N+1)

Problem: p03000
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    n,x = list(map(int, input().split()))
    lll = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(n):
        d = d + lll[i]
        if d > x:
            print(count)
            break
        else:
            count += 1
resolve()            

Failing test case input:
0 0
15 -1 2 1

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
def resolve():
    n,x = list(map(int, input().split()))
    lll = list(map(int, input().split()))
    d = 0
    flag=False
    count = 1
    for i in range(n):
        d = d + lll[i]
        if d > x:
            flag = True
            print(count)
            break
        else:
            count += 1
    if flag == False:
        print(n+1)
resolve()