   // Problem: A. Robot Program   // Contest: Codeforces - Educational Codeforces Round 98 (Rated for Div. 2)   // URL: https://codeforces.com/contest/1452/problem/A   // Memory Limit: 256 MB   // Time Limit: 2000 ms   // Powered by CP Editor (https://github.com/cpeditor/cpeditor)      #include <bits/stdc++.h>      using namespace std;      #define fi first   #define se second   #define pb push_back   #define int long long   #define F(i, n) for (int i = 0; i < n; i++)   #define all(x)(x).begin(), (x).end()      using ld = long double;   using vi = vector <int>;   using mi = map <int, int>;   using pii = pair <int, int>;      const int N = 100005;   const int MOD = 1e9 + 7;      #define show(arr) { for (auto x: arr) cout << x <<    ; cout <<   n ; }   #define show_(arr, n) F(i, n) show(arr[i])      void solve() {    int n; cin>>n;    int a[n],sum=0,mx=0;    F(i,n){     cin>>a[i];     sum+=a[i];     mx=max(mx,a[i]);    }    cout<<max((n-1)*((sum+n-2)/(n-1)),mx*(n-1))-sum<<  n ;   }   int32_t main() {      ios::sync_with_stdio(false);      cin.tie(0);      cout.tie(0);         int32_t t=1;      cin >> t;      while (t--) solve();         return 0;   }