//#define _GLIBCXX_DEBUG #include #include #include using namespace __gnu_pbds; template using ordered_set = tree, rb_tree_tag, tree_order_statistics_node_update>; using namespace std; #define all(n) begin(n), end(n) const long long INF = INT_MAX / 2; typedef long long ll; typedef vector vint; typedef vector> vvint; typedef vector vll; typedef vector> vvll; typedef unsigned long long ull; template bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } template vector make_v(size_t a) { return vector(a); } template auto make_v(size_t a, Ts... ts) { return vector(ts...))>(a, make_v(ts...)); } template typename enable_if::value == 0>::type fill_v(T &t, const V &v) { t = v; } template typename enable_if::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } using mint = atcoder::modint998244353; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; mint ans = 0; if (n != 2) { mint fact = 1; for (int i = 1; i <= n-k; i++) { fact *= i; } if (n != 6) { cout << (k * fact).val() << endl; }else { if(k == 6) { ans = k*fact + 2*24; } else { ans = k*fact; } cout << ans.val() << endl; } } else if (n == 2) { // Aut(S_2) = 1 cout << 1 << endl; } return 0; }