#include <bits/stdc++.h>
using namespace std;
long long fac[200000 + 10];
long long binpow(long long x, long long p) {
  long long res = 1;
  while (p > 0) {
    if (p & 1) res = (res * x) % 998244353;
    x = (x * x) % 998244353;
    p = p >> 1;
  }
  return res;
}
long long inv(long long x) { return binpow(x, 998244353 - 2); }
long long nCr(long long n, long long r) {
  if (n < r) return 0;
  return (fac[n] * inv((fac[n - r] * fac[r]) % 998244353)) % 998244353;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  fac[0] = 1;
  for (long long i = 1; i <= 200000 + 9; i++)
    fac[i] = (fac[i - 1] * i) % 998244353;
  long long n, k;
  cin >> n >> k;
  if (k > n - 1)
    cout << 0;
  else if (k == 0)
    cout << fac[n];
  else {
    long long delta = n - k;
    long long ans = (nCr(n, delta)) % 998244353;
    long long other = 0;
    int curr = 1;
    for (int i = delta; i >= 1; --i) {
      other =
          (other +
           ((((binpow(i, n) * nCr(delta, i)) % 998244353) * curr + 998244353) %
            998244353)) %
          998244353;
      curr = -curr;
    }
    cout << (ans * other * 2) % 998244353;
  }
  return 0;
}
