problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03000
s409000730
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) fly=0 for i in range(100): fly+=l[i] if fly>x: print(i+1) exit()
p03000
s775908018
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: count+=0 print(count)
p03000
s994107541
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
s441455471
Wrong Answer
n,y=map(int,input().split()) lst=list(map(int,input().split())) cnt=0 sum_lst=0 for i in range(1,n+1): cnt+=1 sum_lst+=lst[i-1] if y==0: print(1) break if sum_lst>y: print(cnt) break
p03000
s128153934
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()
p03000
s725815655
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) cnt = 1 d = 0 for i in range(1, n): d = d + l[i-1] if(x - d >= 0): cnt += 1 print(cnt)
p03000
s134125013
Wrong Answer
n,x = map(int,input().split()) a = list(map(int,input().split())) c = 0 b = 0 for i in a: b = i+b if b <= x: c+=1 print(c)
p03000
s902576374
Wrong Answer
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)
p03000
s140995980
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: break total_length = total_length + length[i] count = count + 1 count = count - 1 if count > N: print(N) else...
p03000
s933180481
Wrong Answer
n,x = map(int, input().split()) a = list(map(int, input().split())) cnt = 0 total = 0 for i in range(n): total += a[i] cnt += 1 if total > x: print(cnt) exit()
p03000
s815974008
Wrong Answer
n,x=list(map(int,input().split())) l=list(map(int,input().split())) a=0 for i in range(n): a+=l[i] if a>x:break print(i+1)
p03000
s800923873
Wrong Answer
url = "https://atcoder.jp//contests/abc130/tasks/abc130_b" def main(): n,x = list(map(int, input().split())) lis = list(map(int, input().split())) count = 0 pos = 0 for l in lis: if pos >= x: print(count) exit() pos += l count += 1 if __name__ == '_...
p03000
s870799795
Wrong Answer
#ABC130 B N,X = map(int,input().split()) L = list(map(int,input().split())) D = [0] count = 0 for i in range(1,N+2): D.append(D[i-1]+L[i-2]) if D[i]<= X: count += 1 print(count + 1)
p03000
s704346420
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) Y=[] D=0 e=0 for i in range(1,N+1): while D<=X: D=D+L[i] e+=1 print(e)
p03000
s356158891
Wrong Answer
n,x = map(int,input().split()) l_lst = list(map(int,input().split())) b = 0 sum_l = 0 for l in l_lst: if sum_l > x: break sum_l += l b+=1 print(b)
p03000
s464028850
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: break ans+=1 mem+=i print(ans)
p03000
s307735248
Wrong Answer
import sys N, X = map(int, input().split()) l = list(map(int, input().split())) val, count = 0, 1 for i in l: val += i if val <= X: count += 1 else: print(count) sys.exit()
p03000
s768431418
Wrong Answer
n,x = map(int,input().split()) l = [int(x) for x in input().split()] save = 1 for i in range(1,n+1): if(i==1): d = 0 continue d = d + l[i-2] if(d > x): break save = i print(save)
p03000
s749530048
Wrong Answer
from sys import stdin n, x = map(int, stdin.readline().split()) count = 1 num = 0 l = list(map(int, stdin.readline().split())) for i in l: num += i if(num > x): print(count) break else: count += 1
p03000
s887914388
Wrong Answer
n,x=map(int,input().split()) li=list(map(int,input().split())) ans=1 l=0 for i in li: l+=i if l>x: print(ans) break ans+=1
p03000
s058763307
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = [0] * (n+2) 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)
p03000
s934231910
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 c=1 for i in range (0,n-1): d=d+l[i] if d<=x: c+=1 print(c)
p03000
s371105502
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]): break print(i)
p03000
s433514831
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: count+=1 D+=L[i-1] print(count)
p03000
s487421803
Wrong Answer
N,X = map(int, input().split()) l = list(map(int,input().split())) count = 1 d = 0 for i in range(1,N): d = d + l[i] if d <= X: count += 1 print(count)
p03000
s643732487
Wrong Answer
N,X = map(int,input().split()) Ls = list(map(int,input().split())) D = 0 ans = 0 for i in range(N): D += Ls[i] if X < D: break else: ans += 1 print(ans)
p03000
s941457077
Wrong Answer
n,x=map(int,input().split()) s=list(map(int,input().split())) t=sum(s) b,c=0,0 while b<=x and len(s)>0: c+=1 b+=s[0] del s[0] if t==b: print(n+1) else: print(c)
p03000
s720988954
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
s356142317
Wrong Answer
n,x = map(int,raw_input().split()) l = map(int,raw_input().split()) d1=0 bou = 1 for i in xrange(1,n): di = d1 + l[i-1] d1 = di if di > x: break else: bou += 1 print bou
p03000
s941304126
Wrong Answer
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)
p03000
s383742420
Wrong Answer
N, X = map(int, input().split(' ')) L_ls = map(int, input().split(' ')) D, cnt = 0, 0 for L in L_ls: cnt += 1 D += L if D > X: break print(cnt)
p03000
s118673646
Wrong Answer
def main(): n, x, *ls = map(int, open(0).read().split()) d=0 cou=1 for l in ls: d += l if d <= x: cou+=1 else: return(cou) return n if __name__ == '__main__': print(main())
p03000
s829375627
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) val = 0 count = 0 for l in L: val += l if val <= x: count += 1 print(count)
p03000
s278805124
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 for i in range(N): if D<= X: D += L[i] cnt = i+1 else: break print(cnt)
p03000
s556050852
Wrong Answer
n, x = map(int, input().split()) l_list = list(map(int, input().split())) ans = 1 d = 0 for i in range(1, n): d = d + l_list[i - 1] if d <= x: ans += 1 print(ans)
p03000
s603432347
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]) for i in range(1, n+1): if d[i] <= x: continue else: print(i) exit()
p03000
s859859858
Wrong Answer
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) N, X = mapint() Ls = list(mapint()) now = 0 cnt = 0 for l in Ls: if now>X: break now += l cnt += 1 print(cnt)
p03000
s582382691
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 e = 1 for i in range(n): if d + l[i] <= x: e += 1 d = d + l[i] print(e)
p03000
s717279445
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(ans)
p03000
s209867173
Wrong Answer
N, X = list(map(lambda a: int(a), input().split(" "))) L = list(map(lambda b: int(b), input().split(" "))) i = 1 s = 0 while(s <= X and i < len(L)): s += L[i] i += 1 print(i)
p03000
s707776438
Wrong Answer
# coding = SJIS n, x = map(int, input().split()) lis = list(map(int, input().split())) ans = 1 now = 0 for i in range(n): if now + lis[i] <= x: ans += 1 now += lis[i] if ans > n: ans -= 1 print(ans)
p03000
s430912474
Wrong Answer
n,x = map(int,input().split()) a = list(map(int,input().split())) count = 0 b = 0 for i in range(n): if b >= x: break count+=1 b+= a[i] print(count)
p03000
s456194447
Wrong Answer
import bisect 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) res = bisect.bisect_right(sorted(d), x) #print(len([i for i in d if i <= x])) print(res)
p03000
s138984502
Wrong Answer
a,b=map(int,input().split()) l=list(map(int,input().split())) c=1 d=0 for i in range(a): d+=l[i] if d<=b: print(c) break c+=1
p03000
s800024637
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) tmp = 0 ans = 0 for i in range(n): tmp += l[i] ans += 1 if tmp > x: break print(ans)
p03000
s228015378
Wrong Answer
n, x = list(map(int, input().split())) l = list(map(int, input().split())) d = [0] total = 0 for i in range(n): total += l[i] d.append(total) ans = n for i in range(n+1): if x < d[i]: ans = i break print(ans)
p03000
s152820449
Wrong Answer
def main(): N, X = (int(x) for x in input().split()) L = [int(x) for x in input().split()] D = [0] for i in range(1, N): a = D[i - 1] + L[i - 1] if a <= X: D.append(a) else: break print(len(D)) if __name__ == "__main__": main()
p03000
s069728390
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): cnt+=1 sum_lst+=lst[i] if sum_lst>y: print(cnt-1) break
p03000
s112140155
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)
p03000
s819655031
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 1 point = 0 for i in range(n): if point + l[i] <= x: point = point + l[i] ans = ans + 1 print(min(ans, n + 1))
p03000
s978574084
Wrong Answer
import sys n,x = map(int,input().split()) l_list = list(map(int,input().split())) for i in range(n): if sum(l_list[:i+1]) > x: print(i+1) sys.exit()
p03000
s849226826
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): if d > x: break d = d+listl[cnt] # print(d) cnt+=1 print(cnt)
p03000
s794397102
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 d+=l[i] #print(d) if d>x: break if d==x: a+=1 print(a)
p03000
s698362326
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(i + 1) exit() print(n)
p03000
s385891610
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) z = 0 cnt = 0 while z<=X and cnt<len(L): z += L[cnt] cnt += 1 print(min(cnt, N+1))
p03000
s966675225
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)
p03000
s186673520
Wrong Answer
a = list(map(int,input().split())) b = list(map(int,input().split())) c = 0 d = 0 for i in b: d += i c += 1 if d > a[1]: print(c) break
p03000
s527145731
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
s345823170
Wrong Answer
# ABC 130: B – Bounding N, X = map(int, input().split()) L = [int(s) for s in input().split()] counter = 0 bounding = 0 for l in L: if bounding > X: break counter += 1 bounding += l print(counter)
p03000
s506581079
Wrong Answer
n , x = map(int,input().split()) L =list(map(int,input().split())) ans = 1 D = [0]*(n+1) for i in range(1,n): D[i+1] = D[i] + L[i-1] if D[i+1] <=x: ans+=1 print(ans)
p03000
s179160955
Wrong Answer
n,x = map(int, input().split()) l = list(map(int, input().split())) s = 1 d = 0 for i in range(n): d += l[i] s += 1 if d > x: break print(s)
p03000
s300617973
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) cnt = 1 b = 0 for i in range(n): b += l[i] if b <= x: cnt += 1 else: print(cnt) exit()
p03000
s826324113
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) zahyou = 0 count = 0 for i in range(N): if zahyou <= X: zahyou += L[i] count += 1 print(count)
p03000
s770889428
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 ans=0 i=0 for i in range(n): if d<=x: d+=l[i] ans+=1 print(d) else: break print(ans)
p03000
s298017606
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 count = 0 i = 1 while d <= x: d = d + l[i - 1] count += 1 if i <= n - 1: i += 1 print(count)
p03000
s721808167
Wrong Answer
# coding: utf-8 import sys sr = lambda: sys.stdin.readline().rstrip() ir = lambda: int(sr()) lr = lambda: list(map(int, sr().split())) N, X = lr() L = lr() cnt = 0 cur = 0 for l in L: cnt += 1 cur += l if cur > X: break answer = cnt print(answer)
p03000
s487903626
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) ans = 1 for i in range(n): if x >= sum(l[:i]): ans += 1 print(ans)
p03000
s305276669
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 0 t = 0 for i in range(n): if t <= x: ans += 1 t += l[i] print(ans)
p03000
s016149322
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) cnt = 1 t = 0 for i in range(N): if t + L[i] <= X: cnt += 1 t += L[i] print(cnt)
p03000
s855469711
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 for i in range(2, N + 2): if D + L[i - 2] > X: print(i - 1) break D = D + L[i - 2]
p03000
s586172014
Wrong Answer
n,k=map(int, input().split(' ')) a=list(map(int, input().split(' '))) ans,s=0,0 for i in a: if s<=k: ans+=1 s+=i print(ans)
p03000
s691772994
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) ans = 1 bound = 0 for l in L: bound += l if bound >= X: break ans += 1 print(ans)
p03000
s366698935
Wrong Answer
N,X = map(int, input().split()) L = list(map(int, input().split())) count = 0 D = 0 for i in range(N): D += L[i] count += 1 if D >= X+1: break i += 1 print(count)
p03000
s474702369
Wrong Answer
def main(): n,x = map(int, input().split()) num_list = list(map(int, input().split())) sum = 0 ans = 1 for i in range(n-1): sum += num_list[i] if sum <= x: ans += 1 print(ans) if __name__ == '__main__': main()
p03000
s861730811
Wrong Answer
import math import collections import fractions import itertools def solve(): 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: break print(i+1) return 0 if __name__ == "__main__": solve()
p03000
s905782936
Wrong Answer
n,x=map(int,input().split()) listl=list(map(int,input().split())) sum=0 for k in range(2,n+1): while sum<=x: sum+=listl[k-2] print(k-1)
p03000
s415617950
Wrong Answer
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)
p03000
s088162845
Wrong Answer
N,X=map(int, input().split()) L=list(map(int, input().split())) count = 0 x=0 # X=6 while x <= X and count < N: x = x + L[count] count = count + 1 print(count)
p03000
s164852008
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) ans=0 a=0 for i in range(n): if a<=x: ans+=1 a+=l[i] else: break print(ans)
p03000
s994442937
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) bound = [] bound.append(0) for i in range(1,n+1): tmp = bound[i-1] + l[i-1] bound.append(tmp) bound.sort() ans = 0 for i in range(0,n): if(bound[i] <= x): ans += 1 else: break print(ans)
p03000
s275447226
Wrong Answer
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: print(count) break
p03000
s123046142
Wrong Answer
# coding: utf-8 def solve(X, Ls): c, s = 0, 0 for L in Ls: if s > X: break s += L c += 1 return c if __name__ == '__main__': _, X = map(int, input().split()) print(solve(X, map(int, input().split())))
p03000
s930916266
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]
p03000
s032639273
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) cur = ans = 0 while cur<=x and ans<n: ans += 1 cur += l[ans-1] print(ans)
p03000
s214302753
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: break count += 1 D += L print(count)
p03000
s255946071
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) ln = [0]*(n+1) for i in range(n): ln[i+1] = ln[i] +l[i] for i in range(n+1): if ln[i]>x: print(i) exit()
p03000
s486674331
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) result = 0 res = 0 for i in l: if(result > x): break result += i res+=1 print(res)
p03000
s651569888
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in range(N): if D <= X: count += 1 D = D + L[i] print(count)
p03000
s004423701
Wrong Answer
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+1 break print(ans)
p03000
s617015589
Wrong Answer
N,X=list(map(int,input().split())) L=list(map(int,input().split())) if X==0: print(0) exit() D=[0]*N for i in range(1,len(L)): D[i]=D[i-1]+L[i-1] if D[i]>X: print(i) exit() print(i+1)
p03000
s328526422
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
s528654572
Wrong Answer
f=lambda:map(int,input().split()) _,x=f();c=d=0 for i in f(): c+=1;d+=i if d>x: break print(c)
p03000
s813489051
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) count=0 dist=0 i=0 while dist<=X and i<=N-1: count+=1 dist+=L[i] i+=1 #print(dist) print(count)
p03000
s707193321
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 else: break print(ans)
p03000
s143235739
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) list=[0] cnt=0 for i in l: i=i+list[cnt] list.append(i) cnt+=1 ans=0 for i in list: if i>=x: ans+=1 print(ans)
p03000
s164736388
Wrong Answer
n,x=map(int, input().split()) l=list(map(int, input().split())) c=0 b=0 if l[0]>x: print(1) else: for i in range(n): if b<=x: b+=l[i] c+=1 else: break print(c)
p03000
s937970776
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)
p03000
s673580094
Wrong Answer
a,b=input().split() a=int(a) b=int(b) c=list(map(int,input().split())) d=0 e=1 for i in range(a): while d<b: d=d+c[i] e=e+1 print(e) break
p03000
s158027024
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): while d<b: d=d+c[i] e=e+1 print(e+1) break
p03000
s328844944
Wrong Answer
n, x = map(int,input().split()) l = list(map(int, input().split())) cnt = 0 d = [0] for i in range(1, n): d.append(d[i-1] + l[i]) for i in range(n): if d[i] <= x: cnt +=1 print(cnt)