Divisible Subarrays

Please look into the code. It is giving runtime error

Please send link of question

I have made some changes in your code:

Due to integer overflow s[i]=(s[i]+n)%n is taken.