Given an array of integers, the task is to count minimum number of operations to equalize the array i.e., to make all array elements same. To equalize an array, we need to move values from higher numbers to smaller numbers. Number of operations is equal to number of movements.

**Input:**

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. First line of each test case contains an Integer N denoting size of array and the second line contains N space separated elements.

**Output:**

For each test case, print the minimum number of operations. And print "-1", if it is not possible to equalize the array.

**Constraints:**

1<=T<=100

1<=N<=10^{5}

0<=A[i]<=10^{5}

**Example:
Input:**

2

5

1 3 2 0 4

3

1 7 1

3

4