mam why my code is run time erroe
Divisible subarray
take count array of size n(not of 1000) as x%n can be from 0 to n-1.
sir now its giving me wrong answer is three test case
check this
cums[] can be negative also!
x = (x+n)%n makes sure that x is from 0 to n-1
1 Like