#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
const int mod = 998244353;
int n, fac[MAXN], inv[MAXN];
long long k;
inline int qpow(int a, int b) {
  int re = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) re = 1ll * re * a % mod;
  return re;
}
int main() {
  scanf("%d%lld", &n, &k);
  if (k >= n) return puts("0"), 0;
  fac[0] = fac[1] = inv[0] = inv[1] = 1;
  for (int i = 2; i <= n; ++i)
    fac[i] = 1ll * fac[i - 1] * i % mod,
    inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  for (int i = 2; i <= n; ++i) inv[i] = 1ll * inv[i - 1] * inv[i] % mod;
  if (k == 0) return printf("%d\n", fac[n]), 0;
  int ans = 0;
  for (int i = 0; i <= n - k; ++i)
    ans = (ans + 1ll * ((i & 1) ? mod - 1 : 1) * inv[i] % mod *
                     qpow(n - k - i, n) % mod * inv[n - k - i]) %
          mod;
  ans = 2ll * ans % mod * fac[n] % mod * inv[k] % mod;
  printf("%d\n", ans);
}
