Skip to content

Baekjoon 10409

1. Problem

문제 확인하기

2. Solution (Python, memory: 31256KB, time: 40ms)

n, T = map(int, input().split())
lst = list(map(int, input().split()))
print(next((i for i in range(n) if sum(lst[:i+1]) > T), n))