#include <bits/stdc++.h>
#include <immintrin.h>

#pragma GCC target("avx,avx2")

using namespace std;

#ifndef lisie_bimbi
#define endl '\n'
#endif

using ll = long long;

const ll inf = 1'000'000'000;

random_device rd;

mt19937 rnd(rd());


void solve(){
    int n, m, t;
    cin >> n >> m >> t;
    vector<int> a(n);
    int mn = inf;
    for(int i = 0; i < n; i++){
        cin >> a[i];
        mn = min(mn, a[i]);
    }
    cout << t / mn << endl;
}

signed main(){
#ifdef lisie_bimbi
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
    cin.tie(nullptr)->sync_with_stdio(false);
#endif            
    int t = 1;
    cin >> t;
    while(t--){
        solve();
    }
}