problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03000
s539346789
Wrong Answer
import sys N, X = map(int, sys.stdin.readline().split()) L = list(map(int, sys.stdin.readline().split())) ans = 0 for i, l in enumerate(L): ans += l if ans > X: print(i+1) break else: print(N)
p03000
s732977475
Wrong Answer
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()
p03000
s113223665
Wrong Answer
from itertools import accumulate n,x = map(int,input().split()) lst_l = [0] + list(map(int,input().split())) lst_wa = list(accumulate(lst_l)) cnt = 0 for i in lst_wa: if i < x: cnt += 1 print(cnt)
p03000
s830638364
Wrong Answer
N,X = map(int,input().split()) L = [int(i) for i in input().split()] D =[] D.append(0) x = 0 for i in range(N): x += L[i] D.append(x) ans = 0 for i in range(N+1): if D[i] < X: ans += 1 print(ans)
p03000
s137921322
Wrong Answer
# -*- coding: utf-8 -*- N,X = list(map(int, input().rstrip().split())) L_list = list(map(int, input().rstrip().split())) #----- i=2 D=0 while D <= X: D = D + L_list[i-2] ans = i-1 i += 1 if (i-2) > len(L_list)-1: break print(ans)
p03000
s403541464
Wrong Answer
n,x=list(map(int,input().split())) l=list(map(int,input().split())) d=[0]*n d.append(0) for i in range(1,len(l)+1): d[i]=d[i-1]+l[i-1] for i in range(len(d)): if d[i]>x: print(i) exit()
p03000
s030209996
Wrong Answer
#python3 n,x=map(int, input().split()) l=[int(i) for i in input().split()] ans=0 d=0 for i in range(n): if d>x: break d=d+l[i] ans+=1 print(ans)
p03000
s682355698
Wrong Answer
N, X = map(int, input().split()) L = map(int, input().split()) sumL = 0 count = 0 for x in L: if sumL <= X: count += 1 sumL += x print(count)
p03000
s651912882
Wrong Answer
#ABC 130B 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 print(cnt)
p03000
s915819762
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) for i in range(n+1): #print(sum(l[:i])) if sum(l[:i])>x: break print(i)
p03000
s557386846
Wrong Answer
a,b = list(map(int,input().rstrip().split())) t =list(map(int,input().rstrip().split())) m = 0 for i in range(a): m = m + t[i] if m > b: print(i+1) break elif m == b: print(i+2) break
p03000
s969498516
Wrong Answer
n, x =map(int,input().split()) l = list(map(int,input().split())) d = 0 for i in range(n): if d > x: print(i) exit() d += l[i] print(n)
p03000
s988522615
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) d = 0 cnt = 0 for i in range(n): cnt += 1 d += l[i] if x < d: print(cnt) exit()
p03000
s807565713
Wrong Answer
N, X = map(int,input().split()) lst = list(map(int,input().split())) cnt = 0 now = 0 for i in range(N): l = now + lst[i] cnt += 1 now = l if now > X: break print(cnt)
p03000
s551237953
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 for i in range(n): if d > x: print(i) exit(0) d += l[i] print(n + 1)
p03000
s089972910
Wrong Answer
import sys N, X = map(int, sys.stdin.readline().split()) L = list(map(int, sys.stdin.readline().split())) ans = 0 for i, l in enumerate(L): ans += l if ans > X: print(i+1) break else: print(N-1)
p03000
s475358241
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))
p03000
s921932654
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) count=0 dist=0 i=0 while dist<=X and count<=N: count+=1 dist+=L[i] #print(dist) print(count)
p03000
s612804585
Wrong Answer
def q2(): N, X = (int(i) for i in input().split()) l = [int(i) for i in input().split()] L = [0] for i in range(N): L.append(l[i]) sum_L = L[0] if sum_L >= X: print(1) return ans = 1 for i in range(1, N): sum_L += L[i] if sum_L <= X: ...
p03000
s571328734
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) count = 0 sum = 0 for i in range(n): if sum <= x: count += 1 sum += l[i] print(count)
p03000
s957587264
Wrong Answer
n, x = map(int, input().split()) num = list(map(int, input().split())) d = 0 cnt = 0 for i in range(n): if x == 0: print(0) d += num[i] cnt += 1 if d > x: print(cnt) exit()
p03000
s633184342
Wrong Answer
n, x = map(int,input().split()) l = list(map(int, input().split())) s, count = 0, 0 for i in l: if s>x: break else: s += i count += 1 print(count)
p03000
s156162581
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) res = 0 for i in range(n): res += l[i] if x < res: break print(i+1)
p03000
s282763192
Wrong Answer
n,x = map(int,input().split()) b = list(map(int,input().split())) cnt = 0 ans = 0 for i in b: if cnt <= x: ans += 1 cnt += i print(ans)
p03000
s295809911
Wrong Answer
N, X = map(int, input().split()) L = input().split() L = [int(i) for i in L] d =0 count=1 for i in range(N): d = d+L[i] if d > X: print(count) break count+=1
p03000
s885983572
Wrong Answer
n,x = map(int ,input().split()) l = list(map(int ,input().split())) old_d = 0 count = 1 for i in range(1 ,n+1): new_d =old_d +l[i-1] old_d = new_d print(old_d) if new_d <= x: count +=1 print(count)
p03000
s229309814
Wrong Answer
N,X= map(int,input().split()) li = list(map(int,input().split())) count = 0 for i in range(len(li)): if li[i]<=X: count +=1 else: pass print(count)
p03000
s106651128
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) z=0 ans=0 i=0 for i in range(n): if z>x: break else: ans+=1 z+=l[i] print(ans)
p03000
s930742996
Wrong Answer
n,x= input().split() b_list= list(map(int, input().split())) temp = 0 counter = 0 for i in b_list: if (temp<=int(x)): counter +=1 temp += i print(counter)
p03000
s409857879
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) fly=0 for i in range(n): fly+=l[i] if fly>x: print(i+1) exit()
p03000
s633479544
Wrong Answer
n,x=map(int,input().split()) a=list(map(int,input().split())) cnt=1 now=0 if sum(a)==x: print(n+1) exit() for i in a: now+=i if now>x: print(cnt) exit() cnt+=1
p03000
s793282769
Wrong Answer
n, x = map(int,input().split()) l = list(map(int, input().split())) cnt = 0 d = [0] for i in range(1, n+1): d.append(d[i-1] + l[-1]) for i in range(n): if d[i] <= x: cnt +=1 print(cnt)
p03000
s857114916
Wrong Answer
N,X = map(int,input().split()) l = list(map(int,input().split())) sum=0 for i in range(N): if sum>X: print(i) exit() sum += l[i]
p03000
s082660846
Wrong Answer
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): if d[i] <= x: ans += 1 print(ans)
p03000
s371436909
Wrong Answer
""" author : halo2halo date : 9, Jan, 2020 """ import sys # import numpy as np import itertools read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) N, X, *L = map(int, read().split()) Lcum = itertools.accumulate(L) answer = sum(i ...
p03000
s212635523
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) dim1 = 0 for i in range(n): dim1 = dim1 + l[i] if dim1 > x: print(i+1) break
p03000
s927524111
Wrong Answer
def mapt(fn, *args): return tuple(map(fn, *args)) def Input(): return mapt(int, input().split(" ")) def main(): n, x = Input() l = Input() d = list(range(n+1)) ans = 0 for i in range(1, n+1): d[i] = d[i-1] + l[i-1] for i in d: if i <= x: ans += 1 print(ans)
p03000
s258386527
Wrong Answer
n, x = map(int,input().split()) l = list(map(int, input().split())) s, count = 0, 0 for i in l: if s>x: print(count); break else: s += i; count += 1 else: print(count+1)
p03000
s387281145
Wrong Answer
N,L=map(int,input().split()) A=list(map(int,input().split())) hane=0 count=0 for i in range(N): count+=A[i] hane+=1 if count>L: break print(hane)
p03000
s844700731
Wrong Answer
def main(): n,x = map(int, input().split()) num_list = list(map(int, input().split())) count = 0 sum = 0 while(sum <= x): if count >= len(num_list): break sum += num_list[count] count += 1 print(count) if __name__ == '__main__': main()
p03000
s422873597
Wrong Answer
N, val= list(map(int,input().split())) list = list(map(int,input().split())) d=0 l=[] for i in list: ans=d+i l.append(ans) count=0 for num in l: if num<=val: count=count+1 print(count)
p03000
s749912358
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) D = [0]*(N+1) x = 0 for i in range(1,N+1): D[i] = D[i-1]+L[i-1] while D[x] <= X and x < N: x += 1 print(x)
p03000
s194370770
Wrong Answer
n, x = [int(i) for i in input().split()] l = [int(i) for i in input().split()] a = 0 b = 0 for i in range(n): a += l[i] b += 1 if a > x: break print(b)
p03000
s094935704
Wrong Answer
n, x = list(map(int, input().split())) l = list(map(int, input().split())) c, p = 0, 0 while True: if c == n - 1: break if p + l[c] <= x: p += l[c] c += 1 else: break print(c + 1)
p03000
s276279893
Wrong Answer
n,y=map(int,input().split()) lst=list(map(int,input().split())) lst=[0]+lst cnt=0 sum_lst=0 for i in range(n+1): sum_lst+=lst[i] if sum_lst<=y: cnt+=1 print(cnt-1)
p03000
s247745654
Wrong Answer
N,X=list(map(int, input().split())) L=list(map(int, input().split())) c=1 for i in range(N): if L[i]<=X: c+=1 print(c)
p03000
s108064682
Wrong Answer
a,b=map(int,input().split()) l=list(map(int,input().split())) c=0 d=1 for i in range(a): c+=l[i] if c>b: print(d) break d+=1
p03000
s915550354
Wrong Answer
a,b=input().split() a=int(a) b=int(b) c=list(map(int,input().split())) d=0 e=0 for i in range(a): if d+c[i]<=b: d=d+c[i] e=e+1 print(e+1)
p03000
s443150655
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) ans = 0 d = 0 while d<=x and ans<n: d += l[ans] ans += 1 print(ans)
p03000
s479533797
Wrong Answer
from sys import stdin, setrecursionlimit def main(): input = stdin.buffer.readline n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 for i in range(n): d += l[i] if d > x: print(i + 1) exit() if __name__ == "__main__": setrecu...
p03000
s131547948
Wrong Answer
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)
p03000
s505854993
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)
p03000
s739233759
Wrong Answer
n, x = map(int, input().split()) l_list = list(map(int, input().split())) tmp = 0 for i in range(100): tmp += l_list[i] if tmp > x: break print(i+1)
p03000
s983941017
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) point = 0 ans = 0 for l in L: point += l ans += 1 if point > x: break print(ans)
p03000
s820408430
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) c = 0 d = 0 for i in range(N): c += 1 d += L[i] if d > X: break print(c)
p03000
s962881155
Wrong Answer
N, X = list(map(lambda a: int(a), input().split(" "))) L = list(map(lambda b: int(b), input().split(" "))) i = 0 s = 0 while(s <= X and i < len(L)): s += L[i] i += 1 print(i)
p03000
s699841121
Wrong Answer
import sys input = lambda: sys.stdin.readline().rstrip() input_nums = lambda: list(map(int, input().split())) def main(): N, X = input_nums() L = input_nums() s = 0 cnt = 0 for i in range(N): if s <= X: cnt += 1 s += L[i] print(cnt) if __name__ == '__main__': ma...
p03000
s171001777
Wrong Answer
n, x = map(int, input().split()) print("n:%d" %n) print("x:%d" %x) l = list(map(int, input().split())) sum = 0 b = 1; for i in range(n): sum = sum + l[i] if(sum > x): print(b) break else: if(i == n-1): print(n+1) break else: b=b+1
p03000
s547326231
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) d = 0 for i in range(N): d += L[i] if X < d: print(i + 1) break else: print(N + 1)
p03000
s811074271
Wrong Answer
abc = [int(e) for e in input().split()] length = [int(e) for e in input().split()] N = abc[0] X = abc[1] total_length = 0 count = 1 for i in range(len(length)): if total_length > X: count = count - 1 break total_length = total_length + length[i] count = count + 1 if count > (N+1): p...
p03000
s803966118
Wrong Answer
n,x = map(int, input().split()) l = list(map(int, input().split())) now=0 ans=0 for tmp in l: ans+=1 now+=tmp if now>x: break print(ans)
p03000
s521702493
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) mem=0; ans=0 for i in L: if mem<=X: ans+=1 mem+=i print(ans)
p03000
s429497660
Wrong Answer
icase=0 if icase==0: n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 for i in range(n): d=d+l[i] if d>x: print(i+1) break if d<=x: print(n)
p03000
s521472114
Wrong Answer
N, X = map(int, input().split()) l = [0] + list(map(int, input().split())) d = [0] * (N+1) for i in range(1, N+1): if d[i-1] > X: break d[i] = d[i-1] + l[i] cnt = i print(cnt)
p03000
s484619788
Wrong Answer
n,x=map(int,input().split()) L=[int(_) for _ in input().split()] S_L=[0] count=1 for i in range(n): S_L.append(S_L[-1]+L[i]) if S_L[-1]<=x: count+=1 else: print(count) break
p03000
s939324186
Wrong Answer
n, x = list(map(int, input().split())) l = list(map(int, input().split())) c = 0 total = 0 f = 0 for i in l: total += i if total > x: print(c+1) f = 1 break c += 1 if f == 0: print(c)
p03000
s348109780
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) sum = 0 for k in range(n): sum += l[k] if sum > x: print(k+1) break
p03000
s688950635
Wrong Answer
import sys input = sys.stdin.readline N, X = map(int, input().split()) a = list(map(int, input().split())) cs = [0] * (N + 1) for i in range(N): cs[i + 1] = cs[i] + a[i] res = 0 for i in range(N + 1): if cs[i] > X: res = i break print(res)
p03000
s509898670
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 d += l[i - 1] print(c)
p03000
s716752615
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 a=0 for i in range(n-1): a+=1 i+=1 d+=l[i] if d>x: break if d==x: a+=1 print(a)
p03000
s937689469
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) a = 1 d = 0 for i in range(n): d = d + l[i] if d >= x: if d == x: a += 1 print(a) exit() a += 1
p03000
s680175365
Wrong Answer
N,X = map(int,input().split()) l = list(map(int,input().split())) p = 0 count = 0 for i in range(N): p += l[i] count += 1 if p > X: break print(count)
p03000
s535510427
Wrong Answer
N, X = list(map(int,input().split())) L = list(map(int,input().split())) L.append(0) Ls = sorted(L) sum = 0 count = 0 for i in range(N): if sum <= X: sum += L[i] count += 1 print(count)
p03000
s620134633
Wrong Answer
def main(): n, x = [int(z) for z in input().split()] l = [int(z) for z in input().split()] tam = len(l) d = 0 for i in range(tam): d += l[i] if d > x: print(i + 1) break main()
p03000
s531004361
Wrong Answer
n,x=map(int,input().split()) l=[int(x) for x in input().split()] d=0 cnt=1 for i in l: d+=i cnt+=1 if d >x: print(cnt-1) break elif d==x: print(cnt) break
p03000
s827071463
Wrong Answer
def cumsum(xs): result = [0,xs[0]] for x in xs[1:]: result.append(result[-1] + x) return result a,b=map(int,input().split()) c=list(map(int,input().split())) n=cumsum(c) for i in range(len(n)): if n[i]>b: print(i) break
p03000
s895879122
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
p03000
s464599745
Wrong Answer
INT = lambda: int(input()) INTM = lambda: map(int,input().split()) STRM = lambda: map(str,input().split()) STR = lambda: str(input()) LIST = lambda: list(map(int,input().split())) LISTS = lambda: list(map(str,input().split())) def do(): n,x=INTM() l=LIST() ct=0 temp=0 for i in range(n): temp...
p03000
s028142553
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) i=z=0 while z<=x and i<n: z+=l[i] i+=1 if i==n: i+=1 print(i)
p03000
s601426708
Wrong Answer
inputted = list(map(int, input().split())) N = inputted[0] X = inputted[1] L = list(map(int, input().split())) x = 0 number_of_bounds = 0 for _i, Li in enumerate(L): number_of_bounds = _i + 1 x += Li if x > X: break print(number_of_bounds)
p03000
s451441824
Wrong Answer
#128 b むずい n,x=map(int,input().split()) l=list(map(int,input().split())) z=0 ans=0 for i in range(n): z+=l[i] if z>=x: ans=i+2 break print(ans)
p03000
s266503599
Wrong Answer
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 e = 1 for i in L: if d + i <= X: d += i e += 1 # for i in l: print(e)
p03000
s026995423
Wrong Answer
n,x= input().split() b_list= list(map(int, input().split())) temp = 0 counter = 0 for i in range(int(n)): if (temp<=int(x)): counter +=1 temp += b_list[i] else: break print(counter)
p03000
s505045270
Wrong Answer
n, x = list(map(int, input().split())) l = list(map(int, input().split())) c = 0 total = 0 for i in l: total += i if total > x: print(c+1) break c += 1
p03000
s278141547
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) v=1 w=0 for i in range (N): if X>=w+L[i]: v+=1 w+=L[i] print(v)
p03000
s744012109
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) curCoord = 0 n = 1 while (curCoord<=X): if (n>N): break else: n=n+1 curCoord = curCoord+L[n-2] print(str(n-1))
p03000
s190059236
Wrong Answer
n,x = map(int,input().split()) d = list(map(int,input().split())) bound = 0 count = 0 for i in range(n): count += 1 bound += d[i] if bound > x: print(count) exit() print(count)
p03000
s385155856
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) count = 0 p = 0 for i in L: if p > X: break else: count += 1 p += i print(count)
p03000
s994566519
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) d = 0 cnt = 0 for i in range(n+1): if i <n: d += l[i] cnt += 1 if x < d: print(cnt) exit() print(cnt)
p03000
s699628115
Wrong Answer
n,x=map(int,input().split()) L=list(map(int,input().split())) ans=1 d=0 for i in range(n): d+=L[i] if d<=x: ans+=1 else: print(ans);exit()
p03000
s624894712
Wrong Answer
N,X=map(int,input().split()) length=list(map(int,input().split())) ans=0 D=0 for i in range(N): if D<=X: ans+=1 else: break D=D+length[i] print(ans)
p03000
s979412721
Wrong Answer
n, x = (int(xi) for xi in input().split()) l = [int(xi) for xi in input().split()] d=0 count = 0 for xi in range(n): if d<x: count +=1 d += l[xi] if d<x: count +=1 print(count)
p03000
s489678580
Wrong Answer
import math def main(): t = [int(t)for t in input().split()] n,x = t[0],t[1] l = [int(t)for t in input().split()] i = 0 s = 0 while s<=x and i<n: s += l[i] i+=1 print(i) if __name__ == "__main__": main()
p03000
s810318344
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) Y=[0] D=0 while D<X: for i in range(0,N): D=D+L[i] Y.append(D) if D>=X: break if Y[len(Y)-1]==X: print(len(Y)) else: print(len(Y)-1)
p03000
s812093371
Wrong Answer
n,x = map(int,input().split(" ")) l = list(map(int,input().split(" "))) y = 0 for i in l: y += i if y <= x: print(n) else: count = 1 d = 0 j = 0 while d < x: d += l[j] j += 1 if d <= x: count += 1 print(count)
p03000
s871482407
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) ans = 0 count = 1 for i in range(n): if (ans + l[i]) <= x: ans = ans + l[i] count += 1 print(count)
p03000
s863570530
Wrong Answer
N,X=map(int, input().split()) L=list(map(int, input().split())) distance = 0 count = 0 while distance <= X and count < N: distance = distance + L[count] count = count + 1 print(count)
p03000
s477420004
Wrong Answer
n, x = map(int, input().split()) l = list(int(i) for i in input().split()) d = 0 cnt = 0 for i in range(n): d += l[i] cnt += 1 if d >= x: break print(cnt)
p03000
s906349080
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 else: break a=a+arr[i] print(ans)
p03000
s191340459
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) Y=[0] D=0 while D<=X: for i in range(0,N): D=D+L[i] Y.append(D) if Y[len(Y)-2]==X: print(len(Y)-1) else: print(len(Y)-2)