You are viewing a single comment's thread. Return to all comments →
Python3
n,a = int(input()),list(map(int,input().split())) d,m = map(int,input().split()) ans = 0 for i in range(len(a)): if sum(a[i:i+m]) == d: ans+=1 print(ans)
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Python3