#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define int ll #define INT128_MAX (__int128)(((unsigned __int128) 1 << ((sizeof(__int128) * __CHAR_BIT__) - 1)) - 1) #define INT128_MIN (-INT128_MAX - 1) #define pb push_back #define eb emplace_back #define clock chrono::steady_clock::now().time_since_epoch().count() using namespace std; template ostream& operator<<(ostream& os, const pair pr) { return os << pr.first << ' ' << pr.second; } template ostream& operator<<(ostream& os, const array &arr) { for(size_t i = 0; T x : arr) { os << x; if (++i != N) os << ' '; } return os; } template ostream& operator<<(ostream& os, const vector &vec) { for(size_t i = 0; T x : vec) { os << x; if (++i != size(vec)) os << ' '; } return os; } template ostream& operator<<(ostream& os, const set &s) { for(size_t i = 0; T x : s) { os << x; if (++i != size(s)) os << ' '; } return os; } template ostream& operator<<(ostream& os, const map &m) { for(size_t i = 0; pair x : m) { os << x; if (++i != size(m)) os << ' '; } return os; } #ifdef DEBUG #define dbg(...) cerr << '(', _do(#__VA_ARGS__), cerr << ") = ", _do2(__VA_ARGS__) template void _do(T &&x) { cerr << x; } template void _do(T &&x, S&&...y) { cerr << x << ", "; _do(y...); } template void _do2(T &&x) { cerr << x << endl; } template void _do2(T &&x, S&&...y) { cerr << x << ", "; _do2(y...); } #else #define dbg(...) #endif using ll = long long; using ull = unsigned long long; using ldb = long double; using pii = pair; using pll = pair; //#define double ldb template using min_heap = priority_queue, greater>; template using max_heap = priority_queue; template, class OP = plus> void pSum(rng &&v) { if (!v.empty()) for(T p = v[0]; T &x : v | views::drop(1)) x = p = OP()(p, x); } template, class OP> void pSum(rng &&v, OP op) { if (!v.empty()) for(T p = v[0]; T &x : v | views::drop(1)) x = p = op(p, x); } template void Unique(rng &v) { ranges::sort(v); v.resize(unique(v.begin(), v.end()) - v.begin()); } template rng invPerm(rng p) { rng ret = p; for(int i = 0; i < ssize(p); i++) ret[p[i]] = i; return ret; } template rng Permute(rng v, rng2 p) { rng ret = v; for(int i = 0; i < ssize(p); i++) ret[p[i]] = v[i]; return ret; } template vector> readGraph(int n, int m, int base) { vector> g(n); for(int i = 0; i < m; i++) { int u, v; cin >> u >> v; u -= base, v -= base; g[u].emplace_back(v); if constexpr (!directed) g[v].emplace_back(u); } return g; } template void setBit(T &msk, int bit, bool x) { msk = (msk & ~(T(1) << bit)) | (T(x) << bit); } template void flipBit(T &msk, int bit) { msk ^= T(1) << bit; } template bool getBit(T msk, int bit) { return msk >> bit & T(1); } template T floorDiv(T a, T b) { if (b < 0) a *= -1, b *= -1; return a >= 0 ? a / b : (a - b + 1) / b; } template T ceilDiv(T a, T b) { if (b < 0) a *= -1, b *= -1; return a >= 0 ? (a + b - 1) / b : a / b; } template bool chmin(T &a, T b) { return a > b ? a = b, 1 : 0; } template bool chmax(T &a, T b) { return a < b ? a = b, 1 : 0; } //reference: https://github.com/NyaanNyaan/library/blob/master/modint/montgomery-modint.hpp#L10 //note: mod should be an odd prime less than 2^30. template struct MontgomeryModInt { using mint = MontgomeryModInt; using i32 = int32_t; using u32 = uint32_t; using u64 = uint64_t; static constexpr u32 get_r() { u32 res = 1, base = mod; for(i32 i = 0; i < 31; i++) res *= base, base *= base; return -res; } static constexpr u32 get_mod() { return mod; } static constexpr u32 n2 = -u64(mod) % mod; //2^64 % mod static constexpr u32 r = get_r(); //-P^{-1} % 2^32 u32 a; static u32 reduce(const u64 &b) { return (b + u64(u32(b) * r) * mod) >> 32; } static u32 transform(const u64 &b) { return reduce(u64(b) * n2); } MontgomeryModInt() : a(0) {} MontgomeryModInt(const int64_t &b) : a(transform(b % mod + mod)) {} mint pow(u64 k) const { mint res(1), base(*this); while(k) { if (k & 1) res *= base; base *= base, k >>= 1; } return res; } mint inverse() const { return (*this).pow(mod - 2); } u32 get() const { u32 res = reduce(a); return res >= mod ? res - mod : res; } mint& operator+=(const mint &b) { if (i32(a += b.a - 2 * mod) < 0) a += 2 * mod; return *this; } mint& operator-=(const mint &b) { if (i32(a -= b.a) < 0) a += 2 * mod; return *this; } mint& operator*=(const mint &b) { a = reduce(u64(a) * b.a); return *this; } mint& operator/=(const mint &b) { a = reduce(u64(a) * b.inverse().a); return *this; } mint operator-() { return mint() - mint(*this); } bool operator==(mint b) const { return (a >= mod ? a - mod : a) == (b.a >= mod ? b.a - mod : b.a); } bool operator!=(mint b) const { return (a >= mod ? a - mod : a) != (b.a >= mod ? b.a - mod : b.a); } friend mint operator+(mint c, mint d) { return c += d; } friend mint operator-(mint c, mint d) { return c -= d; } friend mint operator*(mint c, mint d) { return c *= d; } friend mint operator/(mint c, mint d) { return c /= d; } friend ostream& operator<<(ostream& os, const mint& b) { return os << b.get(); } friend istream& operator>>(istream& is, mint& b) { int64_t val; is >> val; b = mint(val); return is; } }; using mint = MontgomeryModInt<998244353>; const int C = 10'000'000; const int prod[] = {0, 863911593, 271705493, 474684617, 339946442, 522678107, 27254752, 35313399, 374076080, 48551534, 925728686, 146724125, 13299908, 72772185, 725334653, 520883190, 288076047, 301724185, 417849243, 716697948, 911367609, 277327168, 151000962, 864174592, 694414022, 126009665, 921690181, 566295671, 747833817, 842416472, 433192762, 968901895, 350218120, 949916334, 772453775, 125078538, 527336407, 762252525, 619532766, 714528461, 709386342, 965656315, 914662452, 975253790, 115604275, 274147606, 188883675, 82719006, 804448540, 710459837, 731737466, 78166932, 641815343, 204239793, 131129153, 385557514, 282721883, 525547249, 815353046, 496232667, 970104651, 535925036, 542089908, 276594744, 102875586, 573500353, 658694300, 99367112, 772108326, 587287600, 380042605, 388227548, 615242102, 396284403, 687419882, 586159287, 57554672, 779282921, 471547076, 654807702, 781135290, 382840358, 679731869, 351455502, 457599473, 586074120, 976686404, 493142367, 886265889, 922700905, 280703889, 356876668, 118642559, 884230036, 167556168, 558711456, 161799090, 829813476, 636137475, 0}; const int inv[] = {0, 403200222, 41801293, 192034704, 920733945, 580781791, 510932260, 391943681, 288738328, 598313566, 226880883, 433151901, 699052614, 233789133, 336652497, 91614907, 512495461, 416393676, 717228094, 786182642, 593335765, 557619479, 348155498, 110435269, 585909217, 306855537, 158466834, 727134288, 857006123, 889170296, 465017252, 960725927, 917069632, 509065608, 480063641, 513980788, 481440572, 469187053, 487676498, 640535828, 789755071, 674318451, 233322176, 557150341, 93201860, 296744145, 23624514, 421334909, 438687356, 548645735, 992371925, 388826328, 632727406, 812980942, 640400940, 552460687, 403622325, 493719555, 734477058, 550536601, 729645135, 985088474, 642209398, 967782059, 638235281, 424295724, 6351088, 834599119, 645218579, 596315092, 706612151, 104584443, 837815684, 966341553, 343542455, 473711613, 997797547, 139390258, 287405430, 933405634, 654859775, 754231256, 197579211, 860707780, 86192439, 354855485, 273084748, 56974024, 326005163, 563675391, 805467376, 302805782, 189994533, 216537277, 399275363, 524197330, 147047668, 101342569, 140972811, 0}; signed main() { ios::sync_with_stdio(false), cin.tie(NULL); int n, k; cin >> n >> k; if (k < n / 2) k = n - k; mint ans = 1; for(int i = k + 1; i <= n;) { if (i % C == 0 and i + C <= n + 1) ans *= prod[i / C], i += C; else ans *= i, i++; } for(int i = 1; i <= n - k;) { if (i % C == 0 and i + C <= n - k) ans *= inv[i / C], i += C; else ans /= i, i++; } cout << ans << '\n'; return 0; }