Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
157 B
1
Indexable
Never
n=int(input())
mas=list(map(int,input().split()))
m=int(input()) 
s=0
for i in range(n):
    s+=mas[i]
    if s>=m:
        print(i+1)
        break