spoj#CNTDO. Count Doubles

Count Doubles

You are given an array of integers. Your task will be to determine how many integers in the array are twice of some other integers in the same array. For example, consider an array

1 3 4 7 9 2 18

Here answer is 3 as 2 is twice of 1, 4 is twice of 2 and 18 is twice of 9.

 

Input

The first line of the input will be an integer T (T<=1000) to represent the number of test cases. Each test case will contain two lines. The first line contains integer N (1<=N<=1000) which indicates the number of distinct integers in the given array. The second line contains N integers and each integer will not be greater than 10000 by its absolute value.

Output

In a single line, output the count of the integers that are double of some other integer.

 

Sample Input

Sample Output

2

7

1 3 4 7 9 2 18

3

1 4 3

 

 

3

0