problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03000
s162815225
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)
p03000
s398476071
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: print(count) break elif d == x: print(count+1) break count += 1
p03000
s001221350
Wrong Answer
N, X = map(int, input().split()) L = [int(x) for x in input().split()] cumsum = 0 for n in range(N): cumsum += L[n] if cumsum == X: print(n+2) exit() if cumsum > X: print(n+1) exit()
p03000
s176004658
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 or count > N + 1: break print(count)
p03000
s089940935
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) D = 0 count = 0 for i in L: D += i count += 1 if D > X: print(count) exit(0)
p03000
s870012273
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) cnt = 1 d = 0 for i in range(n): cnt += 1 d += l[i] if d > x: break print(cnt)
p03000
s808179573
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
s369146091
Wrong Answer
N,X = map(int, input().split()) L = list(map(int, input().split())) dist = 0 count = 1 for i in range(N): if dist + L[i] <= X: count += 1 dist += L[i] print(count)
p03000
s925435293
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) cnt = 1 position = 0 while position < x: for i in range(n): position += l[i] if position <= x: cnt += 1 else: break print(cnt)
p03000
s244113425
Wrong Answer
n,x = map(int,input().split()) b = list(map(int,input().split())) cnt = 0 ans = 0 while cnt<=x: if ans >= len(b): break cnt += b[ans] ans += 1 print(ans)
p03000
s645191414
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) # 累積和 cumulative sum ans = 0 cumul = [0] for i, l in enumerate(L): d = cumul[-1] + l if d > X: #print(i, d) ans = i + 1 break cumul.append(d) #print(cumul) print(ans)
p03000
s695391228
Wrong Answer
N,X=map(int,input().split()) length=list(map(int,input().split())) ans=0 D=0 for i in length: if D<=X: ans+=1 D = D + i print(ans)
p03000
s725426247
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) ans = 1 pos = 0 for i in l: pos += i if pos>x: print(ans) break ans += 1
p03000
s293699856
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = [0] for i in range(n): if((d[i] + l[i]) > x): print(len(d)) break d.append(d[i] + l[i])
p03000
s426008454
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-1): D[i+1] = D[i] + L[i-1] if D[i+1] <=x: ans+=1 print(ans)
p03000
s701663668
Wrong Answer
n,x = map(int, input().split()) l = list(map(int, input().split())) flag = 0 d = [] d.append(0) for i in range(1,n): if d[i-1]+l[i-1] > x: break else: d.append(d[i-1]+l[i]) print(len(d))
p03000
s816318413
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) D=0 cnt=0 for i in range(N): if D<=X: cnt+=1 D +=L[i] else: break print(cnt)
p03000
s751076286
Wrong Answer
n,x=map(int, input().split()) l=list(map(int, input().split())) c=0 b=0 for i in range(n): if b<=x: b+=l[i] c+=1 else: break print(c)
p03000
s157096654
Wrong Answer
n,x=map(int, input().split()) l=list(map(int, input().split())) c=0 b=0 if l[0]>x: print(0) else: for i in range(n): if b<=x: b+=l[i] c+=1 else: break print(c)
p03000
s716414752
Wrong Answer
N, X = map(int, input().split()) nums = [int(i) for i in input().split()] count = 0 for idx in range(N): while count <= X: count += nums[idx] if count == X: print(idx + 2) else: print(idx + 1)
p03000
s877227729
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): if i == 0: continue else: tmp += list_l[i - 1] count += 1 if tmp > x: break print(count)
p03000
s607274331
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
s359036101
Wrong Answer
ans=0 n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 for i in l: d+=i if d<=x:ans+=1 print(ans)
p03000
s913363252
Wrong Answer
# -*- coding: utf-8 -*- """ Created on Tue May 12 00:21:28 2020 @author: shinba """ n,x = map(int,input().split()) L = list(map(int,input().split())) i = 0 ans = 0 for j in range(n): if i <= x: ans += 1 i += L[j] continue else: print(ans) break else: print(ans+1)...
p03000
s384905685
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) i,d=1,0 while(i<n): d+=l[i-1] if d<=x: i+=1 else: break print(i)
p03000
s006663224
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) List = [0]*(N+1) for i in range(1,N+1): List[i] = List[i-1] + L[i-1] print(List) import bisect # A = [i for i in List if i <=X] # print(len(A)) print(bisect.bisect_left(List,X+1))
p03000
s576200964
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)
p03000
s977188363
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[i-1] + l[i -1]) if d[i] <= x: continue else: print(i) exit()
p03000
s625920792
Wrong Answer
a, b = map(int, input().split()) L = list(map(int,input().split())) c = 0 d = 0 for i in range(a): if c <= b: c = c + L[i] d = d+1 else: break print(d)
p03000
s653897001
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
s909411637
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
s931289721
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) d = 0 cnt = 0 for i in range(n+1): cnt += 1 if i <n: d += l[i] if x < d: print(cnt) exit()
p03000
s189716790
Wrong Answer
# coding: utf-8 # Your code here! N,X=map(int, input().split()) List=list(map(int, input().split())) i=0 bow=0 while bow<=X and i<N: bow+=List[i] i+=1 print(i)
p03000
s690850183
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
s862242843
Wrong Answer
n,x = map(int,input().split()) l=list(map(int,input().split())) plot=0 cnt=0 for i in range(n): plot += l[i] if l[i] <= x: cnt += 1 print(cnt)
p03000
s616350147
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
s066881910
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 for i in l: cumsum += i ans += 1 if cumsum > x: print(ans) return if __name__ == '__main_...
p03000
s409646547
Wrong Answer
N, X = map(int,input().split()) L = list(map(int,input().split())) D = [0] for i in range(0,N): D.append(D[i]+L[i]) if D[i+1] >= X: break print(len(D))
p03000
s124482591
Wrong Answer
n, x = map(int, input().split()) num = list(map(int, input().split())) d = 0 cnt = 0 for i in range(n): d += num[i] cnt += 1 if d > x: print(cnt) exit()
p03000
s949908075
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) temp=[0]*(n+1) for i in range(0,n): temp[i+1]=temp[i]+l[i] import bisect print(bisect.bisect_left(temp,x))
p03000
s815012419
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)
p03000
s520697759
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
s427020364
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] if D >= X+1: break count += 1 i += 1 print(count)
p03000
s283541646
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: ans = i-1 break if D[-1] <= X: ans = N+1 print(ans)
p03000
s552417143
Wrong Answer
n, x = map(int, input().split()) L = list(map(int, input().split())) val = 0 for i, l in enumerate(L): val += l if val > x: print(i+1) break if val == sum(L): print(len(L))
p03000
s840789630
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) break
p03000
s230209830
Wrong Answer
import bisect n, x = map(int, input().split()) L = list(map(int, input().split())) D = [0] ans = 1 for i in range(1, n+1): d = D[i-1] + L[i-1] D.append(d) if d <= x: ans += 1 else: print(ans) break
p03000
s840191710
Wrong Answer
n, x = map(int, input().split()) l=list(map(int, input().split())) dis=0 for i in range(n): dis += l[i] if dis > x: print(i+1) exit(0) else: pass
p03000
s129752868
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
s235163136
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: count+=1 d +=l[i] print(count)
p03000
s879578186
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) tmp = 0 ans = 0 for i in L: if tmp<=X: ans += 1 tmp += i else: break print(ans)
p03000
s163086987
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=[0]*(n+1) ans=0 for i in range(n): d[i+1]=d[i]+l[i] for i in range(n): if d[i]<=x: ans+=1 print(ans)
p03000
s768073503
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
s457105845
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) if L[0]>X: print(1) else: D=0 i=0 count=1 while D<=X and i<=N-1: print(D) if D+L[i]<=X: D+=L[i] i+=1 count+=1 else: break print(count)
p03000
s150501752
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
s304909015
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) sumd=0 for i in range(n): sumd+=l[i] if sumd>x: break print(i+1)
p03000
s810895449
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) c=0 tmp=0 for i in range(N): if tmp <=X: c+=1 tmp += L[i] print(c)
p03000
s089699687
Wrong Answer
def function(N, L, X): D = [0] for i in range(1, N+1): D.append(D[i-1]+L[i-1]) if D[-1] > X: return i line = input() N, X = [int(n) for n in line.split()] line = input() L = [int(n) for n in line.split()] print(function(N, L, X))
p03000
s584231560
Wrong Answer
n,x = map(int, input().split()) ll = list(map(int, input().split())) cnt = 0 v = 0 for l in ll: v += l cnt += 1 if v > x: break print(cnt)
p03000
s170838570
Wrong Answer
n, x = map(int, input().split()) l = [0] + list(map(int, input().split())) d = [0] * (n+1) ans = 0 for n in range(1, n+1): d[n] = d[n-1] + l[n-1] if d[n] <= x: ans += 1 print(ans)
p03000
s114336948
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)
p03000
s720435685
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] print(counter)
p03000
s317750298
Wrong Answer
N, X = list(map(int, input().split())) L = list(map(int, input().split())) za = 0 count = 1 while za <= X and count <= N: count += 1 za += L[count-2] print(count-1)
p03000
s115475597
Wrong Answer
n = list(map(int, input().split())) m = list(map(int, input().split())) ans = 0 new_list = [0] for i in range(n[0] - 1): ans = ans + m[i] if ans <= n[1]: new_list.append(ans) elif ans > n[1]: break print(len(new_list))
p03000
s048582787
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: print(i+1) break
p03000
s425458296
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) SUM = 0 cnt = 1 for i in l: SUM += i if SUM > x: print(cnt) exit() cnt += 1
p03000
s002681275
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+1): D.append(D[i-1]+L[i-2]) if D[i]<= X: count += 1 print(count + 1)
p03000
s808025080
Wrong Answer
import itertools n, x = map(int, input().split()) ll = list(map(int, input().split())) dl = [0] + list(itertools.accumulate(ll)) for i in range(len(dl)): if dl[i] > x: print(i) break
p03000
s102505668
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) sumL = 0 count = 0 for x in range(len(L) + 1): if sumL <= X: count += 1 sumL += x print(count)
p03000
s982571680
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) d = 0 e = 1 for i in range(1,n): if d + l[i] <= x: e += 1 d = d + l[i] print(e)
p03000
s758034729
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) a = 0 l.append(0) if len(l) % 2 == 0: for i in range (0,len(l)-1): if l[i]+l[i+1]<= x: a +=1 print(a+1) else : for i in range (0,len(l)-1): if l[i]+l[i+1]<= x: a +=1 print(a)
p03000
s878748774
Wrong Answer
n,x = map(int,input().split()) L = list(map(int,input().split())) cnt = 0 d = 0 while d <=x and cnt <len(L): d +=L[cnt] cnt += 1 print(cnt)
p03000
s097489160
Wrong Answer
n, x = map(int, input().split()) l = [int(s) for s in input().split()] pos = 0 index = 0 while pos <= x: if index >= len(l): break pos += l[index] index += 1 print(index)
p03000
s689343967
Wrong Answer
def main(): n, x = map(int, input().split()) l = list(map(int, input().split())) res = 0 cnt = 1 for i in l: res += i if res <= x: cnt += 1 else: print(cnt) return if __name__ == '__main__': main()
p03000
s488962798
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 else: break s+=i print(ans)
p03000
s997218405
Wrong Answer
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
s317049610
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) bound = 0 cnt = 0 for i in l: bound += i cnt += 1 if bound <= x: break print(cnt+1)
p03000
s615629585
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
s495622308
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) cnt=0 for i, li in enumerate(l): cnt += li if cnt > x: print(i+1) break
p03000
s879692116
Wrong Answer
from itertools import accumulate N, X = map(int, input().split()) Llist = list(accumulate(list(map(int, input().split())))) for i in range(N): if Llist[i] > X: print(i + 1) break
p03000
s008123713
Wrong Answer
n,x = map(int,input().split()) l = list(map(int,input().split())) for i in range(n): if sum(l[:i])>x: break print(i)
p03000
s347169222
Wrong Answer
n, x = map(int, input().split()) l = list(map(int, input().split())) cnt = 0 d = 0 while True: d += l[cnt] cnt += 1 if d > x or cnt > len(l)-1: break print(cnt)
p03000
s916062732
Wrong Answer
n,x = map(int, input().split()) L = list(map(int,input().split())) cnt = 0 for i in range(n): if(sum(L[:i]) <= x): cnt += 1 print(cnt)
p03000
s835949835
Wrong Answer
N, X = [int(i) for i in input().split()] L = [int(i) for i in input().split()] ans = 0 prev = 0 for i in range(1, N + 1): D = prev + L[i - 1] if D <= X: ans += 1 prev = i print(ans)
p03000
s628976424
Wrong Answer
N,X = (int(x) for x in input().split()) L = [int(x) for x in input().split()] s = 0 i = 0 while (s <= X): if i >= N: print(N) quit() else: s = s + L[i] i = i + 1 print(i)
p03000
s322789785
Wrong Answer
import math n,x = map(int,input().split()) l = list(map(int,input().split())) d = [0] for i in range(1, n+1): d.append(d[i-1] + l[i -1]) if x < d[i]: print(i) exit() else: continue
p03000
s543116827
Wrong Answer
n, x = map(int, input().split()) a = [ int(x) for x in input().split() ] cnt = 0 s = 0 for aa in a: if s <= x: cnt += 1 s += aa print(cnt)
p03000
s451050773
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: print...
p03000
s719383174
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
s984755343
Wrong Answer
n,x=map(int,input().split()) l=list(map(int,input().split())) d=0 ans=0 i=0 while d<=x and i<n: d+=l[i] i+=1 ans+=1 print(ans)
p03000
s966187779
Wrong Answer
import sys N, X = map(int, input().split()) l = list(map(int, input().split())) l.insert(0, 0) val, count = 0, 0 for i in l: val += i if val <= X: count += 1 else: print(count) sys.exit()
p03000
s287637191
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
s543856880
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 else: cnt += 1 print(cnt)
p03000
s247721900
Wrong Answer
from collections import deque n, x = map(int, input().split()) L = list(map(int, input().split())) d, i = 0, 0 deq = deque(L) while d <= x and len(deq) > 0: d += deq.popleft() i += 1 print(i)
p03000
s049652143
Wrong Answer
N,X=map(int,input().split()) L=list(map(int,input().split())) if L[0]>X: print(1) else: D=0 i=0 count=0 while D<=X and i<=N-1: D+=L[i] i+=1 count+=1 print(count)
p03000
s144770491
Wrong Answer
N, X = map(int, input().split()) L = list(map(int, input().split())) from itertools import groupby, accumulate, product, permutations, combinations def solve(N,X,L): L = accumulate(L) ans = 1 for i,l in enumerate(L): if l>X: ans += i break return ans print(solve(N,X,L))
p03000
s592586412
Wrong Answer
N,X = map(int,input().split()) L = list(map(int,input().split())) counter = 0 total = 0 for l in L: if(total <=X):counter+=1 total+=l print(counter)
p03000
s765646820
Wrong Answer
n, x = map(int,input().split()) l = list(map(int,input().split())) cnt = 0 now = 0 while now <= x and l: cnt += 1 now += l.pop(0) print(cnt)
p03000
s072676083
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 i<n else i-1) if __name__ == "__main__": main()
p03000
s049156390
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)