Dividible subarrays

https://ide.codingblocks.com/s/187985 have a look and tell which test cases ware comng wrong

Hi @sgdon142,
in ur code u r only counting cases in which cal[i]%n==0,
Here u should also consider cases in which cal[i]%n is occurring more than once.
eg.
arr[ ]= 1,2 3 ,2 5,6,7
pre[ ]= 1,3, 6, 1, 6, 5, 5 (pre[i]=arr[i]%n)
here subarray from index 3 to 5 will also have sum divisible by n=7 since they have pre[i] same and equal to 6. so u need to consider these cases also.