You are given an array A containing N integers. You can apply the following operation on the array:
Find the minimum number of operations required to make all integers of the array equal.
Input format
Output format
For each test case, print the minimum number of operations required to make all integers of the array equal.
Constraints
1≤T≤1041≤N≤1051≤Ai≤109SumofNoveralltestcasesdoesnotexceed2⋅105.
Test case 1: Choose i = 2 and split A[2] = 4 into X = 2, Y = 2 making A = [2, ,2, 2]. Now all elements of the array are equal.
Test case 2: