#pragma region Yoyoyo #ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include using namespace std; using ll=long long; using ld=long double; using i128t=__int128_t; using pii=pair; using pll=pair; const string Yes="Yes"; const string No="No"; const long long inf=1ll<<60; #ifndef LOCAL #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #endif #define fi first #define se second #define pb push_back #define eb emplace_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define faster ios::sync_with_stdio(false);cin.tie(nullptr); #define print(s) cout< inline bool chmax(T &a,T b){return ((a inline bool chmin(T &a,T b){return ((a>b)?(a=b,true):(false));} template ll sum(const T&a){return accumulate(all(a),0LL);} template ostream &operator<<(ostream &os,const pair&p){ os< istream &operator>>(istream &is,pair&p){ is>>p.first>>p.second; return is; } template ostream &operator<<(ostream &os,const vector&v){ int s=v.size(); for(int i=0;i istream &operator>>(istream &is,vector&v){ for(auto &x:v){ is>>x; } return is; } template ostream &operator<<(ostream &os,const vector>&v){ int s=v.size(); for(int i=0;i ostream &operator<<(ostream &os,const vector>>&v){ int s=v.size(); for(int i=0;idx={0,0,-1,1}; vectordy={-1,1,0,0}; // 繰り返し二乗法 ll modpow(ll a, ll n, ll mod) { if (a == 0) { return 0; } ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } // 割り算 ll Div(ll a, ll b, ll m) { return (a * modpow(b, m - 2, m)) % m; } // 階乗 vector fact(1); void fac(ll N, ll m) { fact[0] = 1; for (int i = 1; i <= N; i++) { ll ppp = i; while (ppp % m == 0) { ppp /= m; } fact.pb(fact[i - 1] * (ppp)); fact[i] %= m; } } ll v(ll n, ll p) { ll aaans = 0; ll nppp = n; while (nppp > 0) { aaans += nppp / p; nppp /= p; } return aaans; } // 組み合わせ ll comb(ll n, ll r, ll m) { if (n < r) { return 0; } if (r < 0) { return 0; } if (n < 0) { return 0; } return Div(fact[n], fact[r] * fact[n - r] % m, m); } ll mod=998244353; int main(){ faster; ll M;cin>>M; string t; cin>>t; ll lef0,rig1; for(int i=0;irig1){ print(1);exit(0); } string s; for(int i=lef0;i<=rig1;i++)s+=t[i]; ll N=s.size(); int hen=0; fac(1000000,mod); for(int i=0;i