func_code_string: #include <bits/stdc++.h>   using namespace std;   long long mdin(long long a, long long m) {     long long r1 = m, r2 = a, t1 = 0, t2 = 1;     while (r2 > 0) {       long long q = r1 / r2;       long long r = r1 % r2;       r1 = r2;       r2 = r;       long long t = (t1 - q * t2) % m;       t1 = t2;       t2 = t;     }     return (t1 + m) % m;   }   long long ex(long long a, long long n, long long m) {     if (n == 0) return 1;     long long ans = ex((a * a) % m, n / 2, m);     if (n % 2) ans = (a * ans) % m;     return ans;   }   void bfs(int r, vector<int> adj[], int n) {     queue<int> q, l;     vector<int> vis(n + 1, 0);     q.push(r);     l.push(1);     while (!q.empty()) {       int nd = q.front();       q.pop();       int lv = l.front();       l.pop();       for (auto it : adj[nd]) {         if (vis[it] == 0) {           vis[it] = 1;           q.push(it);           l.push(lv + 1);         }       }     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long t = 1;     while (t--) {       long long n, k;       cin >> n >> k;       if (k > n - 1) {         cout << 0;         return 0;       }       long long f[n + 1], inf[n + 1];       f[0] = 1;       inf[0] = 1;       for (long long i = 1; i <= n; i++) {         f[i] = (i * f[i - 1]) % 998244353;         inf[i] = mdin(f[i], 998244353);       }       if (k == 0) {         cout << f[n] << endl;       } else {         long long ans = (((f[n] * inf[n - k]) % 998244353) * inf[k]) % 998244353;         k = n - k;         long long ml = 0;         int s = 1;         for (long long i = 0; i <= k - 1; i++) {           long long cm = (((f[k] * inf[i]) % 998244353) * inf[k - i]) % 998244353;           long long t = k - i;           long long et = ex(t, n, 998244353);           ml = (ml + (cm * et * s) % 998244353 + 998244353) % 998244353;           s *= -1;         }         ans = (((ml * ans) % 998244353) * 2) % 998244353;         cout << ans << endl;       }     }     return 0;   }   