You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
n, s = int(input().strip()), list(map(int, input().split())) d, m = map(int, input().split()) print(sum([sum(s[i : i + m]) == d for i in range(len(s) - m + 1)]))
Feel free to ask if you have any questions :)
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
Feel free to ask if you have any questions :)