Test case 1 is not passing.
Number theory: Divisible subarrays
Hey @Sharleen-Clement-3051084341644767
long long n, cumsum=0, result=0, i; //make long long
result += ((long long)mod[i] * (mod[i]-1))/2; //typecast rhs to long long to avoid overflow on right side as well
If this doesnt work then let me know 
1 Like
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.