Acwing每日一题:兔子跳
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int T;
scanf("%d", &T);
while (T -- )
{
int x, n;
cin >> n >> x;
int a = 0;
bool flag = false;
while (n -- )
{
int t;
cin >> t;
if (t == x) flag = true;
a = max(a, t);
}
if (flag == true) puts("1");
else if (a > x) puts("2");
else printf("%d\n", (x - 1) / a + 1);
}
return 0;
}