Divisible subarray problem

https://ide.codingblocks.com/s/54437

the code is showing run-error in 1 test case. how to rectify it ?

array can contain negative values.You code is working only on Positive values.
Hit like if u get it.:slight_smile: