Run time error for second test case
Divisible Subarrays Problem on Number thoery
hey @Mp18, as contraints of question is very high change all int inside while loop to long long. Array content can be negative also, so add a statement **temp=(temp+n)%n;**after line 17 no so that mod of negative should also considered.
Thanks. Its working now. But the modulo of a negative number should return a positive number by itself?