problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03000
s797804509
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] if D[i] > X: break print(i)
p03000
s215347891
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) #print(l) a = [0] for i in range(n): a.append(a[i] + l[i]) # print(a) for j in range(len(a)): if a[j] <= x: if j == len(a): print(len(a)) pass else: print(j) break
p03000
s405539520
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 if x<d: break d+=l[i] print(cnt)
p03000
s740563906
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 count = 0 i = 1 while d <= x and i <= n: d = d + l[i - 1] count += 1 i += 1 print(count)
p03000
s582926678
Wrong Answer
import bisect N, X = map(int, input().split()) L = list(map(int, input().split())) for i in range(N-1): L[i+1] += L[i] print(bisect.bisect_right(L, X))
p03000
s242749650
Wrong Answer
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)
p03000
s265041965
Wrong Answer
n,x=map(int,input().split()) l=[int(x) for x in input().split()] ans=0 s=0 for ll in l: if s <= x: ans+=1 s+=ll print(ans)
p03000
s344513362
Wrong Answer
#!/usr/bin/env python3 n, x, *l = map(int, open(0).read().split()) a = 0 while n > a and x >= 0: x -= l[a] a += 1 print(a)
p03000
s461697017
Wrong Answer
n,x = map(int,input().split()) listl = [] listl += map(int,input().split()) # print(listl) cnt=0 d=0 # print(d) while cnt<len(listl): d = d+listl[cnt] if d > x: break # print(d) cnt+=1 print(cnt)
p03000
s262081080
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 cnt=0 for i in range(n): if x<d: break cnt+=1 d+=l[i] print(cnt)
p03000
s695476754
Wrong Answer
N, X = map(int, input().split()) L = map(int, input().split()) D = 0 ans = 0 for l in L: if D > X: break D = D + l ans += 1 print(ans)
p03000
s911695668
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 if now > X: break print(cnt)
p03000
s482935584
Wrong Answer
import sys N , X = map(int,input().split()) L = list(map(int,input().split())) D = 0 for i in range(0,N): D += L[0] if D > X : print(i) sys.exit() print(N)
p03000
s689923587
Wrong Answer
n, x = map(int, input().split()) list = list(map(int, input().split())) jump = 0 cnt = 0 for i in list: if cnt < n and jump <= x: cnt += 1 jump += i else: break print(cnt)
p03000
s105207624
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...
p03000
s533224454
Wrong Answer
n,x=list(map(int,input().split())) l=list(map(int,input().split())) d=0 cnt=0 for i in range(len(l)): if d>=x: print(i+1) exit() d+=l[i]
p03000
s908166667
Wrong Answer
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)
p03000
s333689556
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]) if d[i+1]>x: break print(len(d)-1)
p03000
s530607831
Wrong Answer
def LI(): return [int(s) for s in input().split()] N,X = LI() L_s = LI() D = [0]*N count = 1 for i in range(1,N): D[i] = D[i-1] + L_s[i-1] if D[i] <= X: count += 1 print(count)
p03000
s850029556
Wrong Answer
N,X=map(int, input().split()) L=list(map(int, input().split())) distance = 0 count = 0 while distance <= X and count < N: print(distance) distance = distance + L[count] count = count + 1
p03000
s758459854
Wrong Answer
n,x=map(int,input().split()) s=list(map(int,input().split())) b,c=0,0 while b<=x and len(s)>0: c+=1 b+=s[0] del s[0] print(c)
p03000
s956240607
Wrong Answer
import bisect as bi I=lambda:list(map(int,input().split())) n,x=I() l=I() ans=0 t=0 for i in range(1,n): l[i]+=l[i-1] an=bi.bisect(l,x) print(an)
p03000
s894957872
Wrong Answer
n, x = list(map(int, input().split())) Ls = list(map(int, input().split())) m = Ls[0] count = 0 for i in range(1,n): if m <= x: count += 1 m += Ls[i] else: break print(count+1)
p03000
s605107071
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) print(cnt)
p03000
s359859130
Wrong Answer
#!/usr/bin/env python3 def main(): N, X = map(int, input().split()) L_list = list(map(int, input().split())) D = 0 ans = 0 for n in range(N): if D <= X: ans += 1 D += L_list[n] else: break print(ans) if __name__ == '__main__': main()
p03000
s474210940
Wrong Answer
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)
p03000
s627088393
Wrong Answer
# 初期入力 import sys input = sys.stdin.readline N,X = (int(x) for x in input().split()) L = list(map(int, input().split())) d =[0]*(N+1) count =1 for i in range(N): d[i+1] =d[i] +L[i] if d[i+1] < X: count +=1 else: break print(count)
p03000
s907412976
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)
p03000
s929569285
Wrong Answer
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]))
p03000
s481703917
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 count = 0 i = 1 while d <= x and i <= n: d = d + l[i - 1] count += 1 i += 1 if d < x: count += 1 print(count)
p03000
s510111756
Wrong Answer
n, x = map(int, input().split()) l = input().split() for i in range(n): l[i] = int(l[i]) cnt = 1 sum = 0 for i in range(n): if sum > x: break sum += l[i] cnt += 1 print(cnt)
p03000
s337137588
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 cnt = 1 for i in l: d += i cnt += 1 if d <= x: pass else: print(cnt - 1) exit()
p03000
s992691106
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) i, d = 0, 0 while i<n and d < x: d += l[i] i += 1 print(i)
p03000
s373670403
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)): i += 1 if i < len(L): s += L[i] print(i)
p03000
s876635319
Wrong Answer
n, x = map(int, input().split()) ns = list(map(int, input().split())) d = 0 count = 0 for i in range(n): if d <= x: d += ns[i] count += 1 else: break print(count)
p03000
s593951787
Wrong Answer
import numpy as np n, x = map(int, input().split()) L = list(map(int, input().split())) CS_L = np.cumsum(L).tolist() ans = len([l for l in CS_L if l <= x]) print(ans)
p03000
s460348339
Wrong Answer
y = [int(z) for z in input().split()] l = [int(z) for z in input().split()] d = [0]*(y[0]+1) for i in range(1,y[0]+1): d[i] = d[i-1]+l[i-1] if (d[i]>y[1]): if (i==y[0]): i+=1 break print(i)
p03000
s101708579
Wrong Answer
n,x=map(int,input().split()) li=list(map(int,input().split())) s=0 ans=0 for i in li: if s<=x: s+=i ans+=1 print(ans)
p03000
s096441891
Wrong Answer
import sys input = lambda: sys.stdin.readline().rstrip() def solve(): N, X = map(int, input().split()) L = list(map(int, input().split())) lsum = [0 for _ in range(N + 1)] for i in range(N): lsum[i + 1] = L[i] + lsum[i] for i in range(N): if lsum[i] <= X: ans = i + 1 ...
p03000
s403065421
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) i, d = 0, 0 while i<n and d <= x: d += l[i] i += 1 if d == x and i == n: print(min(i+1,n)) else: print(min(i,n))
p03000
s092520974
Wrong Answer
n,x = map(int, raw_input().split(' ')) ais = map(int, raw_input().split(' ')) count,cur,i = 0,0, 0 while(cur <= x and i < len(ais)): count +=1 cur += ais[i] i +=1 print count
p03000
s468269466
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) a = 0 count = 0 for i in l: if a <= x: a += i count += 1 print(count)
p03000
s409719542
Wrong Answer
n,x = map(int,input().split()) l_list = list(map(int,input().split())) total = 0 ans = 0 for i in range(n): if total <= x: ans += 1 else: break total += l_list[i] print(ans)
p03000
s784370974
Wrong Answer
import sys import math import numpy as np '''a,b= map(int,input().split())''' #a, b, c = [list(map(int, input().split())) for _ in range(3)] #li0= [int(x) for x in input().split()] n,l= map(int, input().split()) #x = [list(map(int, input().split())) for _ in range(n)] li0= [int(x) for x in input().split()] ans=count=0...
p03000
s568718402
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) D=int(0) count=int(1) for i in range(N-1): D+=L[i] if D<=X: count+=1 else: break print(count)
p03000
s220043460
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 else: print(n)
p03000
s352099154
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) a = [0] for i in range(n): a.append(a[i] + l[i]) #print(a) for j in range(len(a)): if a[j] <= x: pass else: print(j) break
p03000
s652912938
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[0] if d <= X: ans += 1 print(ans)
p03000
s675962104
Wrong Answer
n, x = map(int,input().split()) l = list(map(int, input().split())) cnt = 0 for i in range(n): if i + l[i] <= x: cnt +=1 print(cnt)
p03000
s558699632
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): b += 1 if a > x: break a += l[i] print(b)
p03000
s294179646
Wrong Answer
def intMap(): return map(int,input().split()) def intList(): return list(map(int, input().split())) n,x = intMap() l = intList() d = 0 i = 0 while d <= x: d = d + l[i] i += 1 if i >= n: break # ans = min(i,n) print(i)
p03000
s162767560
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) result = 0 res = 0 for i in l: res+=1 result += i if(result > x): break print(res)
p03000
s838157391
Wrong Answer
n, x= input().split() n, x= int(n), int(x) lista=[] sum=0 for x in input().split(): x= int(x) lista.append(x) cont=1 for i in range(n): sum+=lista[i] if sum <= x: cont+=1 print(cont)
p03000
s794523030
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(1+bisect.bisect_left(Z,x))
p03000
s564077808
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) dist = 0 res = 0 for i, l in enumerate(L, 1): dist += l if dist > x: print(i) exit() elif dist == x: print(min(i + 1, n)) exit() print(n)
p03000
s916014951
Wrong Answer
n, x = list(map(int, input().split())) l = list(map(int, input().split())) d = 0 ans = 1 for num in range(n) : d = d + l[num] if d <= x: ans += 1 else: print(ans) break
p03000
s518295662
Wrong Answer
def next_pos(D,L): return D+L N, X = map(int,input().split(" ")) L = [int(i) for i in input().split(" ")] D = 0 count = 0 for i in range(N): if D<=X: count+=1 D = next_pos(D,L[i]) print(count)
p03000
s440305394
Wrong Answer
N,X=map(int,input().split(" ")) L=[int(s) for s in input().split(" ")] Sum=0 Count=0 while Sum<=X: Sum+=L[Count] Count+=1 if Count==N: Count=N+1 break print(Count)
p03000
s886353336
Wrong Answer
n, x = map(int, input().split()) l = list(map(int,input().split())) total = 0 ans = 0 for i in range( len( l )): total += l[ i ] if total > x: ans = i break print( i + 1 )
p03000
s817871022
Wrong Answer
n,x=map(int,input().split()) L=list(map(int,input().split())) cnt=0 ans=0 for l in L: if cnt>=x: break cnt+=l ans+=1 print(ans)
p03000
s074356142
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) k=0 cnt=0 for i in range(n): k += l[i] if k>x: print(i+1) exit() else: cnt += 1 continue print(cnt)
p03000
s281631689
Wrong Answer
n,x = map(int, input().split()) l = tuple(map(int, input().split())) d = [] for i in range(n): if i == 0: d.append(0) else: di = d[i-1] + l[i-1] d.append(di) print(len([i for i in d if i <= x]))
p03000
s624766406
Wrong Answer
import math import string def readints(): return list(map(int, input().split())) def nCr(n, r): return math.factorial(n)//math.factorial(n-r)*math.factorial(r) n, x = map(int, input().split()) l = list(map(int, input().split())) # print(l) ll = [0] sum = 0 for i in range(n): sum += l[i] ll.append(...
p03000
s193974397
Wrong Answer
N,X = map(int,input().split()) L = [int(i) for i in input().split()] D = 0 for i in range(N) : D = L[i]+D # print(i,D) if D>X : print(i+1) exit() print(N)
p03000
s789242945
Wrong Answer
N, X = [int(s) for s in input().split(' ')] Ls = [int(s) for s in input().split(' ')] suma = [0] for L in Ls: suma.append(suma[-1] + L) if suma[-1] > X: break print(len(suma) - 1)
p03000
s843338124
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 1 d = 0 for i in range(1, n): d = d + l[i-1] if d > x: break ans += 1 print(ans)
p03000
s876028610
Wrong Answer
N, X = map(int, input().split()) L_list = list(map(int, input().split())) D = 0 count = 0 for L in L_list: if D <= X: count += 1 else: break D += L print(count)
p03000
s083558120
Wrong Answer
n,k=map(int,input().split()) s=0 l=list(map(int,input().split())) c=0 i=0 while(s<=k and i<n): s+=l[i] i+=1 c+=1 print(c)
p03000
s129929521
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) i, d = 0, 0 while i<n and d <= x: d += l[i] i += 1 print(i)
p03000
s835957189
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)
p03000
s736141669
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 D >= X: print(i + 1) break
p03000
s500510718
Wrong Answer
#ABC130 B N,X = map(int,input().split()) L = list(map(int,input().split())) D = [0,L[0]] count = 0 for i in range(2,N+2): D.append(D[i-1]+L[i-2]) for i in range(0,N+2): if D[i]<= X: count += 1 print(count)
p03000
s729650796
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): x += Li number_of_bounds = _i + 1 if x > X: break print(number_of_bounds)
p03000
s001743333
Wrong Answer
n,x=[int(x) for x in input().split()] l=[int(x) for x in input().split()] d=0 cnt=0 for i in range(n): d=d+l[i] if d<=x: cnt+=1 print(cnt)
p03000
s070756187
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: cnt += 1 break elif d > x: break print(cnt)
p03000
s664011909
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in range(1,N+1): if D>X: break else: D+=L[i-1] count+=1 print(count)
p03000
s612253383
Wrong Answer
N, X = map(int,input().split()) L = list(map(int,input().split())) D = list() D.append(0) count = 1 for i in range(1,N): Dplus=D[i-1]+L[i-1] D.append(Dplus) #print(D[i]) if D[i]<=X: count+=1 else: break print(count)
p03000
s743562111
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) cnt = 1 D_a = 0 D_b = 0 for i in range(N): D_a = D_b + L[i] D_b = D_a if D_a > X: print(cnt) else: cnt += 1
p03000
s306640569
Wrong Answer
n, x = map(int, input().split()) data = [0] + list(map(int, input().split())) count = 0 tmp = 0 for d in data: tmp += d if tmp < x: count += 1 # print(tmp) print(count)
p03000
s498433222
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) a = 0 for i in range(n): a = a + l[i] #print(a) if x == a: print(i+1+1) break elif x <= a: print(i+1) break else: continue
p03000
s852995198
Wrong Answer
def main(): n, x = map(int, input().split()) l = list(map(int, input().split())) sum = 0 for idx, i in enumerate(l): sum += i if sum > x: print(idx + 1) break if __name__ == '__main__': main()
p03000
s580670115
Wrong Answer
def calcBoundCount(rangex, lstL): d = 0 for i in range(0, len(lstL)): d = d + lstL[i] if rangex < d: return i + 1 return len(lstL) N, X = map(int, input().split()) lstL = list(map(int, input().split())) count = calcBoundCount(X, lstL) print((count if count <= N+1 else N+1))
p03000
s265515040
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__...
p03000
s011801320
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) count = 1 x1 = 0 for i in range(n): if x1 + l[i] <= x: count += 1 x1 += l[i] else: print(count) exit()
p03000
s691823757
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
p03000
s850095112
Wrong Answer
line = input() num = (int)(line.split(" ")[0]) limit = (int)(line.split(" ")[1]) x = 0 count = 0 line = input() for i in range(num): if x > limit: break x += (int)(line.split(" ")[i]) count += 1 print(count)
p03000
s845694566
Wrong Answer
def main(): N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 for cnt in range(2, N + 1): D += L[cnt - 1] if D > X: cnt -= 1 break print(cnt) if __name__ == "__main__": main()
p03000
s899003150
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) d = 0 c = 0 while d <= X: c += 1 d += L[c-1] if c >= N: break print(c)
p03000
s509929656
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) k=0 cnt=0 for i in range(n): k += l[i] cnt += 1 if k>x: print(cnt+1) exit() else: continue print(cnt+1)
p03000
s031001111
Wrong Answer
import sys def input(): return sys.stdin.readline().strip() def I(): return int(input()) def LI(): return list(map(int, input().split())) def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def S(): return input() def LS(): return input().spl...
p03000
s720716677
Wrong Answer
k, n = list(map(int, input().split(' '))) l = list(map(int, input().split(' '))) ct = 0 ans = 1 i = 0 while ct <= n: ct += l[i] ans += (ct <= n) print(ans)
p03000
s758069095
Wrong Answer
n,x = map(int, input().split()) L = list(map(int, input().split())) H = 0 count = 0 for i in range(n): if H > x: print(count) exit() else: H += L[i] count += 1 print(n+1)
p03000
s333314904
Wrong Answer
import itertools import bisect n, x = map(int, input().split()) ll = list(map(int, input().split())) dl = [0] + list(itertools.accumulate(ll)) print(bisect.bisect_right(ll, x))
p03000
s709101991
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] if d[1]>x: print(0) exit() for i in range(len(d)): if d[i]>x: print(i) exit()
p03000
s233090415
Wrong Answer
import sys def input(): return sys.stdin.readline().strip() def I(): return int(input()) def LI(): return list(map(int, input().split())) def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def S(): return input() def LS(): return input().spl...
p03000
s064030540
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) m = 0 ans = 0 for l in L: m += l ans += 1 if m > X: print(ans) exit() print(ans)
p03000
s136521079
Wrong Answer
import sys def IL(): return map(int,sys.stdin.readline().rstrip().split()) def Main(): n,x = IL() l = list(IL()) ans = 0 cur = 0 for rep in l: ans += 1 cur += rep if x < cur: break print(ans) return if __name__=='__main__': Main()
p03000
s304838790
Wrong Answer
n, x = map(int, input().split()) l = [int(i) for i in input().split()] d = 0 count = 0 for li in l: if d <= x: count += 1 d += li print(count)
p03000
s050705839
Wrong Answer
n,x=map(int,input().split()) s=list(map(int,input().split())) b,c=0,0 while b<=x and len(s)>0: c+=1 b+=s[0] del s[0] print(c)
p03000
s693549079
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) cnt=0 d=[0 for _ in range(n+1)] d[0]=0 for i in range(1,n+1): d[i]=d[i-1]+l[i-1] if d[i]<=x: cnt+=1 print(cnt)