#include<bits/stdc++.h>
#define ll long long
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define testing cout << "testing ";
#define mod 1000000007
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
void do_the_honour(){
int n;cin >> n;
int a[n];
for(int i=0;i<n;i++) cin >> a[i];
ll sum=accumulate(a,a+n,0LL);
ll x=sum;
ll nn = (-1 + sqrtl(1 + 8 * x)) / 2;
cout << nn+1 << endl;
}
int main(){
optimize();
int t=1;
cin>>t;
for(int z=1;z<=t;z++){
do_the_honour();
}
return 0;
}