Average - MarisaOJ: Marisa Online Judge

Average

Time limit: 1000 ms
Memory limit: 256 MB
Given an array $A$ of $n$ integers, we need to count the number of subarrays whose average is equal to $k$. ### Input - The first line contains 2 integers $n, k$. - The second line contains $n$ integers $A_i$. ### Output - Print the number of subarray with average $k$. ### Constraints - $1 \le n \le 10^5$. - $|A_i| \le 10^6$. - $|k| \le 10^6$, $k$ is an integer. ### Example Input: ``` 5 2 1 3 -2 3 -5 ``` Output: ``` 1 ```