Getting wrong answer in DIVISIBLE SUBARRAY

link to my code. i’ve no idea what’s wrong with this code

3 test cases are failing and two of them are able to pass


if t<0, then -t%n is incorrect!, take (t%n+n)%n
also take freq as long long

thanks…it’s working