#include <bits/stdc++.h>   using namespace std;   const long long inf = 1e9 + 10, N = 2e5 + 10, mod = 998244353, lg = 20,                   sq = 450;   long long t, n, k, first[N], ans;   inline long long power(long long x, long long y) {     long long ret = 1;     x %= mod;     while (y) {       if (y & 1) ret = (ret * x) % mod;       x = (x * x) % mod;       y >>= 1;     }     return ret;   }   inline long long C(long long x, long long y) {     long long ret = first[y];     ret = (ret * power(first[x], mod - 2)) % mod;     ret = (ret * power(first[y - x], mod - 2)) % mod;     return ret;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     first[0] = 1;     for (int i = 1; i < N; i++) first[i] = (first[i - 1] * i) % mod;     cin >> n >> k;     if (k >= n) return cout << 0, 0;     for (int i = 0; i <= n - k; i += 2)       ans = (ans + ((power(n - k - i, n) * C(n - k - i, n - k)) % mod)) % mod;     for (int i = 1; i <= n - k; i += 2)       ans =           (mod + ans - ((power(n - k - i, n) * C(n - k - i, n - k)) % mod)) % mod;     ans = (ans * C(n - k, n)) % mod;     if (k) ans = (ans * 2) % mod;     cout << ans;   }   