#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <string>
#include <string.h>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <map>
#include <set>
#include <iostream>
#include <sstream>
#include <numeric>
#include <cctype>
#include <bitset>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define gep(i,g,j) for(int i = g.head[j]; i != -1; i = g.e[i].next)
#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcount
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define df(x) int x = in()
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
inline int in() { int x; scanf("%d",&x); return x;}
inline void priv(vi a) { rep(i,sz(a)) printf("%d%c",a[i],i==sz(a)-1?'\n':' ');}
const int MX = 100005, INF = 1001001001;
const ll LINF = 1e18;
const double eps = 1e-10;
// Segment tree (RMQ type)
struct seg {
vector<int> d; int x2;
seg(){}
seg(int mx) {
x2 = 1; while(x2 < mx) x2 <<= 1;
d.resize(x2<<1);
}
void mul(int& x, int y) {
if ((ll)x*y > INF) x = INF;
else x *= y;
}
void fil() {
drep(i,x2) {
d[i] = 1;
mul(d[i],d[i<<1]);
mul(d[i],d[i<<1|1]);
}
}
int get(int a, int b, int i=1, int l=0, int r=-1){
if (r == -1) r = x2;
if(a <= l && r <= b) return d[i];
int c = (l+r)>>1;
int res = 1;
if(a < c) mul(res,get(a,b,i<<1,l,c));
if(c < b) mul(res,get(a,b,i<<1|1,c,r));
return res;
}
};
//
int main() {
int n, m;
scanf("%d%d",&n,&m);
seg t(n+2);
rep(i,n) {
scanf("%d",&t.d[t.x2+i]);
if (t.d[t.x2+i] == 0) {
cout<<n<<endl;
return 0;
}
}
t.fil();
// cout<<t.get(0,2)<<endl;
int ans = 0;
rep(i,n) {
int l = i, r = n, c;
while (l+1<r) {
c = (l+r)>>1;
if (t.get(i,c) <= m) l = c; else r = c;
}
maxs(ans, l-i);
}
cout<<ans<<endl;
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:79:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^
./Main.cpp:82:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&t.d[t.x2+i]);
^