代码:
#include<bits/stdc++.h>
using namespace std;
#define qwq ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
int main()
{
qwq;
int n, m;
double l, r = 10000000000;
scanf("%d %d", &n, &m);
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
l = max(l, double(m / (i * x)));
r = min(r, double(m / ((x - 1) * i)));
}
if (r == 10000000000) printf("xiaogougege");
else if (r - ceil(l) + 1 <= 0) printf("0");
else printf("%d", r - ceil(l) + 1);
return 0;
}