One day Jim came across array of N numbers(a[N]).He decided to divide these N numbers into different groups.Each group contains numbers in which sum of any two numbers should not be divisible by an integer K.Print the size of the group containing maximum numbers.

**Input:**

First line of the input contains an integer **T**, denoting the number of test cases. Then T test cases follows.The first line of each test case contains 2 space-separated integers N and K respectively.

The second line contains N space-separated integers denoting the N numbers which Jim came across.

**Output:**

Print the size of the group containing maximum numbers in a new line.

**Constraints:**

1<=T<=100

1<=N<=100000

1<=K<=100000

1<=a[i]<=100000;1<=i<=N

**Example:**

**Input:**

1

4 8

1 7 2 6

**Output:**

2

**Explanation:**

K=8

The group of numbers which can be formed are: (1),(2),(7),(6),(1,2),(1,6),(7,2),(7,6),So,the maximum possible size if the group is 2.

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

VISHESHA SADU | 27 |

ghanshyam648 | 25 |

Biswajit3 | 21 |

karthik_kasaragadda | 20 |

tanya_sharma | 18 |

KshatriyaYash | 1066 |

nikhil_sojan | 978 |

lonecoder | 935 |

mazumderrohit8 | 864 |

SumitSingh27 | 832 |

blackshadows | 5327 |

Ibrahim Nash | 5215 |

akhayrutdinov | 5111 |

mb1973 | 4468 |

Quandray | 4444 |

Login to report an issue on this page.