Divisible subarray problem


sir please check my code iam getting 3 runtime error

Can you pls elaborate with the approach you have used in your code … Since I am not able to understand it…