#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const long long mod = 998244353;
long long f[maxn], n, k;
inline void prepare() {
  f[0] = 1;
  for (long long i = 1; i < maxn; i++) f[i] = f[i - 1] * i % mod;
}
inline long long qpow(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x % mod;
    y >>= 1;
    x = x * x % mod;
  }
  return ans;
}
int main() {
  prepare();
  cin >> n >> k;
  if (k == 0)
    printf("%I64d\n", f[n]);
  else if (k >= n)
    printf("0\n");
  else {
    long long ans = 0, m = n - k;
    for (long long i = 0; i <= m; i++) {
      if (i % 2 == 0)
        ans = (ans + f[m] * qpow(f[i], mod - 2) % mod *
                         qpow(f[m - i], mod - 2) % mod * qpow(m - i, n) % mod) %
              mod;
      else
        ans = (ans -
               f[m] * qpow(f[i], mod - 2) % mod * qpow(f[m - i], mod - 2) %
                   mod * qpow(m - i, n) % mod +
               mod) %
              mod;
    }
    ans = ans * f[n] % mod * qpow(f[m], mod - 2) % mod * qpow(f[k], mod - 2) %
          mod * 2 % mod;
    printf("%I64d\n", ans);
  }
  return 0;
}
