#include <bits/stdc++.h>
using namespace std;
long long int mod = 998244353;
const long double error = 2e-6;
const long double PI = acosl(-1);
mt19937 rng((unsigned)chrono::system_clock::now().time_since_epoch().count());
inline long long int MOD(long long int x, long long int m = mod) {
  long long int y = x % m;
  return (y >= 0) ? y : y + m;
}
const int inf = 1e9;
const long long int infl = LLONG_MAX;
const int nmax = (1LL << (20)) + 10;
long long int modexpo(long long int x, long long int n, long long int m = mod) {
  long long int ret = 1;
  while (n) {
    if (n & 1) ret = ret * x % m;
    x = x * x % m;
    n >>= 1;
  }
  return ret;
}
long long int fac[nmax], facinv[nmax];
void precal() {
  fac[0] = 1;
  for (int i = 1; i < nmax; i++) {
    fac[i] = fac[i - 1] * i % mod;
  }
  facinv[nmax - 1] = modexpo(fac[nmax - 1], mod - 2);
  for (int i = nmax - 1; i > 0; i--) {
    facinv[i - 1] = facinv[i] * i % mod;
  }
}
long long int ncr(long long int n, long long int r) {
  long long int ret = fac[n];
  ret *= facinv[r] * facinv[n - r] % mod;
  return ret % mod;
}
long long int solve(long long int m, long long int n) {
  long long int ret = fac[n];
  ret *= facinv[m] * facinv[n - m] % mod;
  ret %= mod;
  ret *= modexpo(m, n);
  ret %= mod;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, k;
  cin >> n >> k;
  if (k >= n) {
    cout << 0 << endl;
    return 0;
  }
  precal();
  if (k == 0) {
    cout << fac[n] << endl;
    return 0;
  }
  int m = n - k;
  long long int ans = 0;
  for (int i = m, k = 1; i >= 1; i--, k = -k) {
    ans += k * (ncr(m, i) * modexpo(i, n) % mod);
    ans = MOD(ans);
  }
  ans *= ncr(n, m);
  ans %= mod;
  ans *= 2;
  ans %= mod;
  cout << ans;
  return 0;
}
