0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-26 05:11:58 +00:00
OI-codes/AcWing/3971/3971.cpp

23 lines
406 B
C++

#include <bits/stdc++.h>
using namespace std;
int t, n, k, a, ans;
int main() {
std::ios::sync_with_stdio(false);
cin >> t;
while (t--) {
ans = 0x3f3f3f3f;
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> a;
if (k % a == 0) {
ans = min(ans, k / a);
}
}
cout << ans << endl;
}
return 0;
}