Problem: You are given an integer array , all its elements are distinct.
First, you are asked to insert one more integer into this array. should not be equal to any of .
Then, you will have to make all elements of the array equal. At the start, you choose a positive integer (). In one operation, you add to exactly one element of the array. Note that is the same for all operations.
What's the smallest number of operations it can take you to make all elements equal, after you choose and ?
Input Format: The first line contains a single integer () — the number of testcases.
The first line of each testcase contains a single integer ().
The second line contains integers (). All are distinct.
The sum of over all testcases doesn't exceed .
Output Format: For each testcase, print a single integer — the smallest number of operations it can take you to make all elements equal, after you choose integers and .
Note: In the first testcase, you can choose , the array becomes . Then choose and apply the operation times to the first element, times to the second element, time to the third element and times to the fourth element.
In the second testcase, you can choose .
In the third testcase, you can choose . Then apply the operation once to .