#include<bits/stdc++.h>
using namespace std;
long long T,n,k,w[1005],sum=1;
int main(){
freopen("NPH.in","r",stdin);
freopen("NPH.out","w",stdout);
cin>>T;
while (T--){
cin>>n>>k;
long long fl=0;
for (long long i=1;i<=n;i++){
cin>>w[i];
if (w[i]!=1) fl=1;
}
if (n==1){
cout<<w[1]*k<<endl;
}else if (fl==0){
//1:n,2:n*(n-1),3:n*(n-1)*(n-2);
for (long long i=1;i;i++){
sum+=sum*n;
if (sum>=k){
cout<<i<<endl;
break;
}
}
}else{
cout<<w[1]<<endl;
}
}
return 0;
}