187985 pliz look my code and tell errors
Divisible subarrays
You did a mistake while taking mod of the prefix sum. since the mod could be negative as well, you need to make it positive and i have improved your logic for calculating (v[i]*(v[i-1]-1))/2.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.