#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define lld double
#define rep(i,a,b) for(ll i=a;i<=b;i++)
#define all(v) v.begin(),v.end()
#define vc vector
#define rep1(it,v) for(it=v.begin();it!=v.end();it++)
#define ayush ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define input(v) for(auto &it:v)cin>>it
#define inf 1000000007
#define pb push_back
#define mp make_pair

ll power(ll x,ll n, ll p )
{ ll result=1; while(n>0) { if(n%2 ==1) result=(result%p*x%p)%p; x=(x%p*x%p)%p; n=n/2; } return result%p; }


void solve()
{
    ll n; cin>>n; vc<ll> v1(n); input(v1);
    sort(all(v1));
    
    ll a1=*max_element(all(v1));  ll sum=accumulate(all(v1),(ll) 0);
    
    ll start=a1; ll end=1e10;
    while(start<end)
    {
        ll mid=start+(end-start)/2;
        
        if((mid*(n-1)-sum)>=0) end=mid;
        else start=mid+1;
    }
    
    cout<<(end*(n-1)-sum)<<endl;
    
    
    
    
}

int main()
{
    ayush;
    //cout<<setprecision(12); 
    ll t=1; 
    cin>>t;
    while(t--)
    {
        solve();
    }
}