problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03000
s986150438
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: if x < cur: break ans += 1 cur += rep print(ans) return if __name__=='__main__': Main()
p03000
s728347676
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) D = 0 count = 0 for i in range(N): if D <= X: count += 1 else: break D += L_list...
p03000
s575869598
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) exit() else: tmp+=L[i] ans+=1 print(ans)
p03000
s558246833
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
s077775736
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 0 bound = 0 for i in l: bound += i ans += 1 if bound > x: break print(ans)
p03000
s321015627
Wrong Answer
import sys def input(): return sys.stdin.readline().rstrip() def main(): _, x = map(int, input().split()) l = tuple(map(int, input().split())) d_sum = 0 for i, j in enumerate(l): if d_sum > x: print(i) quit() d_sum += j else: print(i+1) if __name__ ...
p03000
s708677807
Wrong Answer
N, X = [int(i) for i in input().strip().split()] L = [int(i) for i in input().strip().split()] pos = 0 res = 1 for i in range(N): if X < pos: break pos += L[i] res += 1 print(res)
p03000
s290059567
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in L: D += i if D <= X: count += 1 print(count)
p03000
s377458949
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
s394762217
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) d = 0 c = 1 for i in l: d += i if(c <= x):c += 1 else:break print(c)
p03000
s426219783
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) sum = 0 b = 1; for i in range(n): sum = sum + l[i] if(sum > x): print(b) else: if(i == n-1): print(n+1) else: b=b+1
p03000
s502066662
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) p = 0 ans = 0 for l_ in l: if p > x: break p = p + l_ ans += 1 print(ans)
p03000
s759901286
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 else: print(i+1)
p03000
s313516497
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 num = 1 while D <= N: D = D + L[num-1] if D >= X: print(num) break num += 1 else: print(N)
p03000
s936615462
Wrong Answer
n,x=map(int,input().split()) a = list(map(int,input().split())) p = 0 f = 0 for i in a: if f <= x: f += i p += 1 else: break print(p)
p03000
s199950551
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) ans = 1 d = 0 for x in L: d += d + x if d <= X : ans += 1 print(ans)
p03000
s663885449
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] print(ans)
p03000
s308982993
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) tmp = 0 ans = 1 for i in range(n): tmp += l[i] if tmp > x: ans += i break print(ans)
p03000
s794736735
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 count += 1 p += i print(count)
p03000
s707423259
Wrong Answer
# Di−1+Li−1(2≤i≤N+1) # Di−1+Li−1(2≤i≤N+1) 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 if x > X: number_of_bounds = _i + 1 break print(number_of_bounds)
p03000
s214607499
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
s232374166
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(len(d)): if d[i] <= x: ans += 1 else: print(ans) exit()
p03000
s149186629
Wrong Answer
n,x = map(int, input().split()) L = list(map(int, input().split())) cnt = 1 bx = 0 for l in L: cnt += 1 bx += l if bx == x: print(cnt) break elif bx > x: print(cnt - 1) break
p03000
s004297768
Wrong Answer
n,x=map(int,input().split()) a=list(map(int,input().split())) total=0 for i in range(n): if total>x: break total+=a[i] if total==sum(a): print(n+1) else: print(i+1)
p03000
s687714630
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) dist = 0 cnt = 0 for i in range(N): if dist <= X: dist += L[i] cnt += 1 else: break; print(cnt)
p03000
s668755434
Wrong Answer
d = 0 d <= 1000 i = 1
p03000
s328340558
Wrong Answer
n,x = map(int,input().split()) li = list(map(int,input().split())) d = 0 count = 0 for i in range(len(li)): if x >= d: count += 1 else: break d += li[i] print(count)
p03000
s671502842
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) s = 0 c = 0 for i in range(n): s += 1 c += l[i] if c > x: break print(s)
p03000
s960627303
Wrong Answer
#b n,x=map(int, input().split()) l = list(map(int, input().split())) d = 0 c = 0 for i in l: d += i c += 1 if d > x: break print(c)
p03000
s882360949
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(n)
p03000
s188640102
Wrong Answer
n,x = map(int,input().split()) L = list(map(int,input().split())) D = 0 c = 0 for i in range(n): if D <= x: c += 1 D += L[i] print(c)
p03000
s600356418
Wrong Answer
N, X=map(int, input().split()) Llist = list(map(int, input().split())) position=0 cnt=1 for i in range(N): position+=Llist[i] if position < X: cnt+=1 print(cnt)
p03000
s013936296
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) k=0 for i in range(n): k += l[i] if k>x: print(i+1) exit() else: cnt=i continue print(cnt+1)
p03000
s477469589
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) x = 0 ans = 0 for i in range(N): if x > X: break else: ans += 1 x += L[i] print(ans)
p03000
s182366789
Wrong Answer
N, X = map(int, input().split()) l = list(map(int, input().split())) d = 0 answer = 0 for i in range(N): if d <= X: answer += 1 d += l[i] else: break print(answer)
p03000
s050242701
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))
p03000
s961386956
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) wa = 0 d = [0]*(n+2) d[1]=0 d.pop(0) wa = 1 for i in range(2,n+1): d[i]=d[i-1]+l[i-2] if(d[i]>x): break wa+=1 print(wa)
p03000
s845710618
Wrong Answer
import itertools import math import fractions import functools import copy n, x = map(int, input().split()) l = list(map(int, input().split())) count = 0 d = 0 for i in range(n): if d <= x: count += 1 d +=l[i] else: break print(count)
p03000
s626184321
Wrong Answer
n,x=map(int,input().split()) a=list(map(int,input().split())) sum=0 ans=1 for i in range(n) : if sum + a[i] <= x : sum+=a[i] ans+=1 print(ans)
p03000
s793041795
Wrong Answer
def ll(): return list(map(int,input().split())) def l(): return int(input()) n,x = ll() l = ll() d = 0 count=0 for i in range(n): if d<=x: d +=l[i] count+=1 else:break print(count)
p03000
s607763872
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) exit()
p03000
s269222783
Wrong Answer
N,X= map(int,input().split()) li = list(map(int,input().split())) count = 0 li.append(0) li2 = sorted(li) for i in range(len(li2)): if li[i]+li[i-1]<=X: count +=1 else: pass print(count)
p03000
s787296788
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) Sum = 0 ans = 0 i = 0 while Sum <= x: Sum += l[i] i += 1 ans += 1 if i >= len(l): break print(ans)
p03000
s089418519
Wrong Answer
N,X = map(int,input().split()) L = [int(i) for i in input().split()] D = 0 count = 0 for n in L: D += n count += 1 if D > X: break print(count)
p03000
s307488542
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 cnt = 1 for i in range(N): if D<= X: D += L[i] cnt += 1 else: break print(cnt)
p03000
s738408878
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) sum1 = 0 cnt = 1 for i in L: sum1 += i if sum1 <= x: cnt += 1 else: print(cnt) exit()
p03000
s192432127
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 cnt=1 for i in range(n): if d+l[i]<=x: d+=l[i] cnt+=1 print(cnt)
p03000
s399799623
Wrong Answer
N,X = map(int, input().split()) L = list(map(int, input().split())) l = [] cnt = 0 l.append(int(0)) for i in range(N): l.append(l[i]+L[i]) if l[i] <= X: cnt += 1 print(cnt)
p03000
s220093640
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)
p03000
s753759668
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
s519564409
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 x < d: print(cnt) if i <n: d += l[i] cnt += 1 #print(cnt)
p03000
s296836748
Wrong Answer
s = input().split(" ") n = int(s[0]) x = int(s[1]) L = list(map(int, input().split(" "))) dist = 0 ans = 0 for i in range(n): if dist <= x: ans += 1 else: break dist = dist + L[i] print(ans)
p03000
s347741690
Wrong Answer
N, X = map(int, input().split()) *L, = map(int, input().split()) ans = 0 d = 0 while ans < N and d <= X: d += L[ans] ans += 1 print(ans)
p03000
s854269566
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+1 break print(ans)
p03000
s775415575
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) sum = 0 ans = 0 for i in range(n): sum += l[i] if sum>x: print(i+1) break
p03000
s875445033
Wrong Answer
n,x=map(int,input().split()) l=list(int(i) for i in input().split()) s=[] for i in range(len(l)+1): t=sum(l[:i]) if t < x: s.append(t) print(len(s))
p03000
s925158257
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)
p03000
s904962903
Wrong Answer
N,X=map(int,input().split()) length=list(map(int,input().split())) ans=0 distance=[0]*(N+1) for i in range(N): distance[i+1]=distance[i]+length[i] if distance[i]<=X: ans+=1 print(ans)
p03000
s610655120
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
s692748467
Wrong Answer
n, x = list(map(int, input().split())) Ls = list(map(int, input().split())) count = 1 check = 0 for i in range(n): check += i if check <= x: count += 1 else: break print(count)
p03000
s233854694
Wrong Answer
import sys input = lambda: sys.stdin.readline().rstrip() def main(): n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 0 cumsum = [0] * (len(l) + 1) for i in range(len(l)): cumsum[i+1] = cumsum[i] + l[i] for i in cumsum: if i <= x: ans += 1 ...
p03000
s327980102
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[-1]) for i in range(n): if d[i] <= x: cnt +=1 print(cnt)
p03000
s269308023
Wrong Answer
N,X = map(int,input().split()) L = [int(i) for i in input().split()] D = 0 count = 1 for n in L: D += n count += 1 if D > X or count > N + 1: break print(count)
p03000
s641215566
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
s175010936
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
s519821886
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) if count > 0 else print(1) exit() pos += l cou...
p03000
s347547131
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 L if l <= x]) print(ans)
p03000
s361296987
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 cnt=1 for i in range(2,n+1): d=d+l[i-1] if d<=x: cnt+=1 print(cnt)
p03000
s974676231
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 for i in range(n): s += l[i] i+=1 if s<x: break print(i) if __name__ == "__main__": main()
p03000
s578336082
Wrong Answer
n,x=map(int, input().split()) l=list(map(int,input().split())) cnt=0 zahyou=0 while zahyou<=x and cnt<=n-1: zahyou+=l[cnt] cnt+=1 print(cnt)
p03000
s241713094
Wrong Answer
N,X=map(int,input().split()) List = list(map(int, input().split())) height = 0 res = 1 def checkF(k,x): if k>=x: return True else: return False for i in range(N): if checkF(height,X): break height += List[i] res +=1 print(res)
p03000
s072711064
Wrong Answer
N, X = map(int, input().split()) lstL = list(map(int, input().split())) def calcBoundCount(rangex, lstL): d = 0 for i in range(0, len(lstL)): d = d + lstL[i] if rangex < d: return i + 1 print(calcBoundCount(X, lstL))
p03000
s658024157
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) d, i = 0, 0 while d <= x and i < n: d += L[i] i += 1 print(i)
p03000
s101086260
Wrong Answer
N,X = map(int,input().split()) l = list(map(int,input().split())) L = [0] + l D = [0] count = 0 for i in range(1,N+2): D.append(D[i-1]+L[i-1]) if D[i]<= X: count += 1 print(count + 1)
p03000
s283075266
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) count=0 tmp=0 L.insert(0,0) for i in range(N): tmp+=L[i] if tmp<=X: count+=1 print(count)
p03000
s979476698
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) count = 0 s = 0 for i in range(N): if s <= X: count += 1 s += L[i] print(count)
p03000
s510971497
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() exit()
p03000
s039686761
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) b=0 cnt=0 for i in l: b+=i cnt+=1 if b>x: print(cnt) break
p03000
s204196004
Wrong Answer
n,x=map(int,input().split()) *l,=map(int,input().split()) s=0 c=0 for i in range(n): s+=l[i] c+=1 if s>x: break print(c)
p03000
s556463291
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
s020756875
Wrong Answer
n,x=map(int,input().split()) l=[0]*n l[:]=map(int,input().split()) d=0 for ii in range(n): d+=l[ii] if d>x: print(ii+1) exit()
p03000
s330270087
Wrong Answer
n,x = map(int, input().split()) l = list(map(int, input().split())) s = 0 d = 0 for i in range(n): d += l[i] s += 1 if d > x: break print(s)
p03000
s710550952
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(bound)
p03000
s864957800
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in range(0,N): if D>X: break else: count+=1 D+=L[i] print(count)
p03000
s861307629
Wrong Answer
N,X=map(int,input().split()) *L,=map(int,input().split()) p=0 cnt=0 for i in L: if (X<p):break cnt+=1;p+=i print(cnt)
p03000
s096297843
Wrong Answer
n,x=list(map(int,input().split())) l=list(map(int,input().split())) d=[] d.append(0) if d[0]>x: print(1) exit() for i in range(1,len(l)+1): d.append(d[i-1]+l[i-1]) if d[i]>x: print(i) exit()
p03000
s319070703
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) a =[0] ans = n+1 for i in range(n): s = a[i] + l[i] if s > x: ans = i+1 a.append(s) print(ans)
p03000
s581388134
Wrong Answer
N, X = map(int, input().split()) l = list(map(int, input().split())) d = 0 answer = 0 for i in range(len(l)): if d <= X: answer += 1 d += l[i] else: break print(answer)
p03000
s883306892
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 print(i+2)
p03000
s634036774
Wrong Answer
count=0 a=0 n,x = map(int,input().split()) li = list(map(int,input().split())) for i in range(n): if (a<=x): a=a+li[i] count+=1 print(count)
p03000
s470874762
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) d = 0 count = 1 for i in range(n): d += l[i] if d < x: count += 1 elif d == x: print(count+1) quit() else: print(count) quit()
p03000
s691328211
Wrong Answer
r=input().split() N=int(r[0]) X=int(r[1]) d=[int(s) for s in input().split()] ans=1 le=0 for i in range(N): le+=d[i] if le>X: print(ans) break else: ans+=1
p03000
s950761635
Wrong Answer
n,x=map(int,input().split()) l=[int(i) for i in input().split()] d=0 ans=n+1 for i in range(n): d=d+l[i] if d>x: ans=i break print(ans+1)
p03000
s858578369
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] print(ans)
p03000
s070910576
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in range(0,N): if D<=X: count+=1 D+=L[i] else: break print(count)
p03000
s362352485
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()] d = [0] for i in range(n): d.append(d[i]+l[i]) result = 0 for i in range(n): if d[i]<=x: result +=1 print(result) if __name__ == "__main...
p03000
s074158377
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) temp = 0 for i in range(N): temp += L[i] if temp > X: break print(i+1)
p03000
s486117707
Wrong Answer
#130 n,x = map(int, input().split()) l = list(map(int, input().split())) res = 1 sm = 0 for i in range(1,n): if sm + l[i] <= x: res += 1 sm =+ l[i] print(res)
p03000
s753370102
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
s882701642
Wrong Answer
N, X = map(int,input().split()) L = list(map(int,input().split())) D = list() D.append(0) count = 1 Dplus=0 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)