n, k = map(int, input().split())
weights = list(map(int, input().split()))
count = 0
getw = 0
for i in weights[:]:
getw += i
weights.remove(i)
if getw >= k or len(weights) == 0:
count += 1
getw = 0
print(count)
CCF Python题解(100分)201703-1 分蛋糕
最新推荐文章于 2021-10-13 22:14:59 发布