#include namespace { #pragma GCC diagnostic ignored "-Wunused-function" #include #pragma GCC diagnostic warning "-Wunused-function" using namespace std; using namespace atcoder; #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(i,n) for(int i = (int)(n) - 1; i >= 0; i--) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) template bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; } template bool chmin(T& a, const T& b) { if (b < a) { a = b; return true; } else return false; } using ll = long long; using P = pair; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; using mint = modint998244353; void square(vector& a) { int n = a.size(); int z = (int)internal::bit_ceil((unsigned int)(n + n - 1)); a.resize(z); internal::butterfly(a); for (int i = 0; i < z; i++) { a[i] *= a[i]; } internal::butterfly_inv(a); a.resize(n + n - 1); mint iz = mint(z).inv(); for (int i = 0; i < n + n - 1; i++) a[i] *= iz; } void mul(vector& f) { int sz = f.size(); f.resize(sz + 9); rrep(i, sz - 1) f[i+10] -= f[i]; rep(i, sz + 8) f[i+1] += f[i]; }; } int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector p{1}; int n2 = n / 2; mul(p); rrep(i, __lg(n2)) { square(p); if (n2 >> i & 1) mul(p); } auto q = p; if (n % 2) mul(q); mint ans; rep(x, 9) rep(y, 11) { int z1 = (9900 + x + 45 * (-x + y)) % 99; int z2 = (9900 - x + 45 * (x + y)) % 99; static vector px, qx; px.clear(), qx.clear(); for(int i = z1; i < p.size(); i += 99) px.emplace_back(p[i]); for(int i = z2; i < q.size(); i += 99) qx.emplace_back(q[i]); auto rx = convolution(px, qx); rep(i, rx.size()) { ans += rx[i] * mint::raw(z1 + z2 + 99 * i).pow(k); } } cout << ans.val() << '\n'; }