#include <bits/stdc++.h>
const int mod = 998244353;
int fac[200005], inv[200005];
int powm(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1LL * ret * a % mod;
    a = 1LL * a * a % mod;
    b >>= 1;
  }
  return ret;
}
int C(int n, int m) { return 1LL * fac[n] * inv[m] % mod * inv[n - m] % mod; }
int calc(int n, int m) {
  int now = 1, ret = 0;
  for (int k = 0; k <= m; k++) {
    ret = (ret + 1LL * now * C(m, k) % mod * powm(m - k, n) % mod + mod) % mod;
    now = -now;
  }
  return ret;
}
int main() {
  int n;
  long long k;
  scanf("%d%lld", &n, &k);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1LL * fac[i - 1] * i % mod;
  inv[n] = powm(fac[n], mod - 2);
  for (int i = n - 1; i >= 0; i--) inv[i] = 1LL * inv[i + 1] * (i + 1) % mod;
  if (k == 0)
    printf("%d\n", fac[n]);
  else if (k >= n)
    printf("0\n");
  else {
    k = n - k;
    printf("%lld\n", 2LL * C(n, k) % mod * calc(n, k) % mod);
  }
  return 0;
}
