Divisible subarrays


error?

@Vibhuti0206
Declare array ‘a’ and array ‘prefixSum’
ll a[n];
ll prefixSum[n+1];

Also your syntax for memset should include the size of prefixSum
memset(prefixSum,0,sizeof prefixSum);

Spelling of ‘ans’ in loop is wrong.