0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 13:18:46 +00:00
Baoshuo Ren 2021-09-18 19:05:17 +08:00 committed by Baoshuo Ren
parent cf82beddae
commit 7129c8ffa6
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

22
AcWing/3971/3971.cpp Normal file
View File

@ -0,0 +1,22 @@
#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;
}