#include <bits/stdc++.h>
using namespace std;
const int N = 200005, P = 998244353;
int n, m, ans;
int fac[N], invf[N];
long long K;
int ksm(int a, int b) {
  int x = 1;
  for (; b; b& 1 ? x = 1ll * x * a % P : 0, a = 1ll * a * a % P, b >>= 1)
    ;
  return x;
}
int C(int a, int b) { return 1ll * fac[a] * invf[b] % P * invf[a - b] % P; }
int main() {
  scanf("%d%lld", &n, &K);
  if (K >= n) {
    puts("0");
    return 0;
  }
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1ll * fac[i - 1] * i % P;
  invf[n] = ksm(fac[n], P - 2);
  for (int i = n - 1; i >= 0; i--) invf[i] = 1ll * invf[i + 1] * (i + 1) % P;
  if (!K) {
    printf("%d\n", fac[n]);
    return 0;
  }
  m = n - K;
  for (int i = 0; i <= m; i++)
    ans = (ans + (i & 1 ? -1ll : 1ll) * C(m, i) * ksm(m - i, n)) % P;
  printf("%d\n", (2ll * ans * C(n, m) % P + P) % P);
  return 0;
}
