#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
const long long MOD = 998244353;
const long long INF = 0x3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - 48;
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return x * f;
}
long long fac[MAXN];
long long rev[MAXN];
long long re[MAXN];
long long qpow(long long x, long long n) {
  long long ans = 1;
  while (n) {
    if (n & 1) {
      ans *= x;
      ans %= MOD;
    }
    x *= x;
    x %= MOD;
    n >>= 1;
  }
  return ans;
}
long long inv(long long x) { return qpow(x, MOD - 2); }
void mark() {
  for (int i = 0; i < 2; i++) {
    fac[i] = rev[i] = re[i] = 1;
  }
  for (int i = 2; i < MAXN; i++) {
    fac[i] = (fac[i - 1] * i) % MOD;
    rev[i] = (MOD - MOD / i) * rev[MOD % i] % MOD;
    re[i] = re[i - 1] * rev[i] % MOD;
  }
}
long long C(long long x, long long y) {
  if (x < 0 || x < y) {
    return 0;
  }
  return fac[x] * re[y] % MOD * re[x - y] % MOD;
}
long long N, K;
void init() { mark(); }
void solve() {
  long long ans;
  scanf("%lld%lld", &N, &K);
  init();
  if (K >= N) {
    ans = 0;
  } else if (!K) {
    ans = fac[N];
  } else {
    ans = 0;
    for (long long i = N - K, j = 1; i > 0; i--, j = -j) {
      ans += qpow(i, N) * C(N - K, i) * j % MOD;
    }
    ans %= MOD;
    ans = (2 * C(N, K) % MOD * ans % MOD + MOD) % MOD;
  }
  printf("%lld\n", ans);
}
int main() {
  int T;
  T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
