#include #include namespace my{ using ml=atcoder::modint998244353; auto&operator>>(std::istream&i,ml&x){int t;i>>t;x=t;return i;} auto&operator<<(std::ostream&o,const ml&x){return o<>(istream&i,ulll&x){ull t;i>>t;x=t;return i;} ostream&operator<<(ostream&o,const ulll&x){return(x<10?o:o<>(istream&i,lll&x){ll t;i>>t;x=t;return i;} ostream&operator<<(ostream&o,const lll&x){return o<0?x:-x);} auto range(bool s,ll a,ll b=1e18,ll c=1){if(b==1e18)b=a,(s?b:a)=0;return array{a-s,b,c};} constexpr char nl=10; constexpr char sp=32; lll pw(lll x,ll n,ll m=0){assert(n>=0);lll r=1;while(n)n&1?r*=x:r,x*=x,m?r%=m,x%=m:r,n>>=1;return r;} bool in(auto l,auto m,auto r){return l<=m&&mconcept vectorial=is_base_of_v,V>; templateistream&operator>>(istream&i,vector&v){fe(v,e)i>>e;return i;} templateostream&operator<<(ostream&o,const vector&v){fe(v,e)o<?nl:sp);return o;} templatestruct vec:vector{ using vector::vector; vec(const vector&v){vector::operator=(v);} vec&operator^=(const vec&u){this->insert(this->end(),u.begin(),u.end());return*this;} vec operator^(const vec&u)const{return vec{*this}^=u;} vec&operator++(){fe(*this,e)++e;return*this;} vec&operator--(){fe(*this,e)--e;return*this;} }; void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<>...>>a);} templatevoid pp(const auto&...a){ll n=sizeof...(a);((cout<0,c)),...);cout<dp(M); dp[offset]=1; fo(i,N){ vecndp(M); fo(j,M){ if(dp[j]==0)continue; fo(d,D){ fo(x,pw(10,d),pw(10,d+1)){ ll nj=j-(d+1)-(i>0)+x; if(in(0,nj,M))ndp[nj]+=dp[j]; } } } swap(dp,ndp); } pp(dp[offset]); }}