#include using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) template bool chmax(T &a, const T &b) { if(a bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;} //------------------------------------------------------- int N; string X; ll memo[102][2][2][11][1<<11]; const ll mo=998244353; ll hoge(int d,int lz,int le,int cmo,int mask) { if(d==N) { if(lz) return 0; if(cmo) return 0; if(mask&1) return 0; return 1; } if(memo[d][lz][le][cmo][mask]>=0) return memo[d][lz][le][cmo][mask]; ll ret=0; int i,j; FOR(i,10) { if(le==0&&i>X[d]) continue; int nmo=(cmo*10+i)%11; int nmask=1<>N>>X; FORR(x,X) x-='0'; MINUS(memo); cout<