#include <bits/stdc++.h>
using namespace std;
const int maxn = 200050;
const long long MOD = 998244353;
long long fac[maxn];
long long n, k;
long long quickpow(long long a, long long b) {
  long long c = 1;
  while (b) {
    if (b & 1) c = c * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return c;
}
long long inv(long long a) { return quickpow(a, MOD - 2); }
long long C(long long n, long long k) {
  return fac[n] * inv(fac[k]) % MOD * inv(fac[n - k]) % MOD;
}
void init() {
  fac[0] = 1;
  for (long long i = 1; i < maxn; i++) fac[i] = fac[i - 1] * i % MOD;
}
void solve() {
  init();
  scanf("%lld %lld", &n, &k);
  if (n <= k)
    printf("0\n");
  else if (k == 0)
    printf("%lld\n", fac[n]);
  else {
    long long res = 0, m = n - k;
    for (int i = 0; i <= m; i++) {
      long long f = (i % 2 == 0) ? 1 : MOD - 1;
      res = (res + f * C(m, i) % MOD * quickpow(m - i, n) % MOD) % MOD;
    }
    printf("%lld\n", C(n, m) * res * 2 % MOD);
  }
}
int main() {
  solve();
  return 0;
}
