[Source](https://www.hackerrank.com/challenges/divisible-sum-pairs)
# Problem statement
You are given an array of ![](./Resources/Element1.svg) integers, ![](./Resources/Element2.svg), and a positive integer, ![](./Resources/Element3.svg). Find and print the number of ![](./Resources/Element4.svg) pairs where ![](./Resources/Element5.svg) and ![](./Resources/Element6.svg) + ![](./Resources/Element7.svg) is divisible by ![](./Resources/Element3.svg).  

For example, ![](./Resources/Element8.svg) and ![](./Resources/Element9.svg).  Our three pairs meeting the criteria are ![](./Resources/Element10.svg) and ![](./Resources/Element11.svg).  


**Function Description**

Complete the divisibleSumPairs function in the editor below.  It should return the integer count of pairs meeting the criteria.  

divisibleSumPairs has the following parameter(s):  


* n: the integer length of array ![](./Resources/Element12.svg)  
* ar: an array of integers  
* k: the integer to divide the pair sum by  

**Input Format**

The first line contains ![](./Resources/Element13.svg) space-separated integers, ![](./Resources/Element1.svg) and ![](./Resources/Element3.svg). 


The second line contains ![](./Resources/Element1.svg) space-separated integers describing the values of ![](./Resources/Element14.svg).


**Constraints**


* ![](./Resources/Element15.svg)
* ![](./Resources/Element16.svg)
* ![](./Resources/Element17.svg)

**Output Format**

Print the number of ![](./Resources/Element4.svg) pairs where ![](./Resources/Element5.svg) and ![](./Resources/Element18.svg) + ![](./Resources/Element19.svg) is evenly divisible by ![](./Resources/Element3.svg).


**Sample Input**

```
6 3
1 3 2 6 1 2
```

**Sample Output**

```
 5
```

**Explanation**

Here are the ![](./Resources/Element20.svg) valid pairs when ![](./Resources/Element21.svg): 


* ![](./Resources/Element22.svg)   
* ![](./Resources/Element23.svg)   
* ![](./Resources/Element24.svg)   
* ![](./Resources/Element25.svg)   
* ![](./Resources/Element26.svg)   
