You are given an array \(A\) of \(N\) positive integers. Your task is to add a minimum number of non-negative integers to the array such that the floor of an average of array \(A\) becomes less than or equal to \(K\).
The floor of an average of array \(A\) containing \(N\) integers is equal to \(\lfloor\frac{\sum\limits_{i=1}^{N} A_i}{N} \rfloor\). Here \(\lfloor . \rfloor\) is the floor function. You are given \(T\) test cases.
Input format
- The first line contains a single integer \(T\) that denotes the number of test cases. For each test case:
- The first line contains two space-separated integers \(N\) and \(K\) denoting the length of the array and the required bound.
- The second line contains \(N\) space-separated integers denoting the integer array \(A\)
Output format
For each test case (in a separate line), print the minimum number of non-negative integers that should be added to array \(A\) such that the floor of an average of array \(A\) is less than or equal to \(K\).
Constraints
\(1 \leq T \leq 10 \\ 1 \leq N \leq 2 \times 10^5 \\ 1 \leq A[i] \leq 10^9 \\ 0 \leq K \leq 10^9\)