#include <bits/stdc++.h>
using namespace std;
const int Mod = 998244353;
int fpow(int a, int b) {
  int ans = 1, t = a;
  while (b) {
    if (b & 1) ans = 1ll * ans * t % Mod;
    t = 1ll * t * t % Mod;
    b >>= 1;
  }
  return ans;
}
int fac[200010];
int inv[200010];
int C(int n, int m) { return 1ll * fac[n] * inv[m] % Mod * inv[n - m] % Mod; }
int S(int n, int m) {
  int ans = 0;
  for (int k = 0; k <= m; k++) {
    int val = 1ll * C(m, k) * fpow(m - k, n) % Mod;
    if (k & 1)
      ans = (ans - val + Mod) % Mod;
    else
      ans = (ans + val) % Mod;
  }
  ans = 1ll * ans * inv[m] % Mod;
  return ans;
}
int main() {
  int n;
  long long k;
  scanf("%d %I64d", &n, &k);
  if (k > n) {
    printf("0\n");
    return 0;
  }
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;
  inv[n] = fpow(fac[n], Mod - 2);
  for (int i = n; i >= 1; i--) inv[i - 1] = 1ll * inv[i] * i % Mod;
  if (k == 0)
    printf("%d\n", fac[n]);
  else
    printf("%d\n", 2ll * S(n, n - k) % Mod * fac[n - k] % Mod * C(n, k) % Mod);
  return 0;
}
