Love For The Twins
Submissions: 2552   Accuracy:

58.87%

  Difficulty: Easy   Marks: 2

Suppose you have two pets and you love both of them very much. You go to a pet store to buy different articles for your pets. But you ask salesman that you will buy only those articles which are actually in pair. In this store, articles are referred as integers. 
So you have to tell total no. of articles you will buy for your pets.

Note: Time complexity O(n).

Input : 
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. 
Second line contains the no. of articles "N" shown by the salesman.
Third line contains N - separated integers describing the articles referred as an integer.

Output : 
Total No. of articles you will prefer to buy for your pets.

Constraints:
1 ≤ T ≤ 200
1 ≤ N ≤ 1000
1 ≤ A[N] ≤ 1000

Example : 
Input : 

1
7
10 10 10 20 20 10 20

Output :
6

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Mohit Gupta :)
Author: Mohit Gupta 4


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.