Divisible subarray

please help me to explain this question…

In input: you are given an integer n and arr[n], where n denotes the number of elements in an array arr[n] …

then you need to find out those subarrays from all the subarrays possible of this arr[ ]…
whose sum is divisible by n…

for example :
example-01:
n=5
arr[ ] = 1 1 1 1 1

all subarrays are:
1, 1 1, 1 1 1, 1 1 1 1, 1 1 1 1 1 …
subarrays whose sum=5 are:
1 + 1 + 1+ 1+ 1 = 5 ==> only one so ans=1;

example:02:
n=5
arr[ ] = 1 2 3 4 -1

all subarrays are:
1 , 1 2, 1 2 3, 1 2 3 4, 1 2 3 4 -1
2 , 2 3 , 2 3 4, 2 3 4 -1
3 , 3 4 , 3 4 -1,
4 , 4 -1,
-1

subarrays whose sum=5 are:
2 3 , ===> hence only one subarray whose sum is 5 so ans=1;

Now approach this Problem…
Hint : use prefix sum subarray to find the subarray sum…

I hope this help if you have further doubt feel free to ask