adsense

Tuesday, 17 September 2019

Exercise

                          To all my viewers I'm currently a member of the internship program for a human welfare council and I need your help to assist the people who need us by donating any amount you can. YOUR SMALL GESTURE WILL HELP A FAMILY SMILE. Follow the link and you will get to our campaign page :



Please after funding whatever amount you can share me the screenshot of the receipt to my email - sumanmukherjee2001@gmail.com

So that I can send you a receipt for the contribution you made and tell the happiness you shared. 😊

  


    HackerRank   Exercises :-



 Try the Exercises yourself don't take any direct help from the net. If you fail at first attempt then just keep thinking about the problem and that wow moment will suddenly strike your head! But if you face any problem then let me know in the comments below and I'll make a video for its solution :)

Exercise :1

You are given an array of  integers, , and a positive integer, . Find and print the number of pairs where  and  +  is evenly divisible by .


Input Format

The first line contains  space-separated integers,  and , respectively. 
The second line contains  space-separated integers describing the respective values of .

Constraints


Output Format

Print the number of  pairs where  and  +  is evenly divisible by .

Sample Input

6 3
1 3 2 6 1 2

Sample Output

 5

Explanation

Here are the  valid pairs:




No comments:

Post a Comment