Given an array of N, integers Find the longest subarray which is divisible by K.
The first line of the integer contains two integers N, K the number of elements in the array and K ($$$1 \le N, K \le 10^5$$$)
Next line contains N spaces integers the value of the array integers value may include negative value too.
For each test case print the length of the longest subarray.
6 3 7 8 3 -3 4 2
Result : Successful
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.Continue to Log In
Your challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.