func_code_string: #include<bits/stdc++.h>   #define ll long long   #define ull unsigned long long   #define pii pair<int,int>   using namespace std;   long long mod=1000000007;   ll gcd(ll a, ll b)    {        if (b == 0)            return a;        return gcd(b, a % b);    }    void solve()   {       ll n;cin>>n;       ll a[n];       ll sum=0;       for(int i=0;i<n;i++) cin>>a[i],sum+=a[i];       sort(a,a+n);       ll req=(sum+n-2)/(n-1);      // cout<<req<<   ;       ll ans=req*(n-1);       if(req<a[n-1]) ans=a[n-1]*(n-1);       cout<<ans-sum<<endl;   }   int main()   {       ios_base::sync_with_stdio(false);       cin.tie(0);cout.tie(0);       int t;cin>>t;       while(t--)       {           solve();       }       return 0;   }   