func_code_string: #include <bits/stdc++.h>   using namespace std;      #define ll long long int   #define pll pair<ll, ll>   #define vl vector<ll>   #define pb push_back   #define pp pop_back   #define f(i, a, b) for (ll i = a; i < b; ++i)   #define rev(i, a, b) for (ll i = a; i >= b; --i)   #define print(x) cout << x << endl   #define endl   n    #define F first   #define S second   #define setbits(x) __builtin_popcountll(x)   #define zerobits(x) __builtin_ctzll(x)   #define to(n) to_string(n)   #define low(v, n) lower_bound(v.begin(), v.end(), n) - v.begin()   #define upp(v, n) upper_bound(v.begin(), v.end(), n) - v.begin()   #define mod 998244353   #define mex 100005      ll power(ll x, ll y)   {       if (y == 0)       {           return 1;       }       if (y % 2 == 0)       {           return power((x % mod) * (x % mod), y / 2) % mod;       }       else       {           return ((x % mod) * power((x % mod) * (x % mod), y / 2) % mod);       }   }      ll modinverse(ll a, ll m)   {       return power(a, m - 2);   }      ll ncr(ll n, ll r)   {       ll k = min(r, n - r);       ll result = 1;       ll divide = 1;          f(i, 1, k + 1)       {           result = ((result % mod) * ((n + 1 - i) % mod)) % mod;           divide = ((divide % mod) * (i % mod)) % mod;       }          result = (result * modinverse(divide, mod)) % mod;       return result;   }      int main()   {       ios_base::sync_with_stdio(0);       cin.tie(0);       cout.tie(0);          ll t;       cin >> t;       while (t--)       {           ll n;           cin >> n;           string s;           cin >> s;              ll p = 0;           ll q = 0;           ll i = 0;           while (i < n)           {               if (s[i] ==  0 )               {                   p++;                   ++i;               }               else if (s[i] ==  1  && i + 1 < n && s[i + 1] ==  1 )               {                   q++;                   i += 2;               }               else               {                   ++i;               }           }              print(ncr(p + q, p));       }          return 0;   }