#include <bits/stdc++.h>
using namespace std;
const int MAX = 510000;
const long long int MOD = 998244353;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long FINV(int n) {
  if (n < 0) return 0;
  return finv[n];
}
long long int mod_pow(long long int x, long long int n, long long int mod) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
int main() {
  long long int n, k;
  cin >> n >> k;
  COMinit();
  if (k > n - 1) {
    cout << 0 << endl;
    return 0;
  }
  if (k == 0) {
    cout << fac[n] << endl;
    return 0;
  }
  long long int ans = 0;
  long long int flag = 1;
  for (int i = (n - k + 1) - 1; i >= 0; --i) {
    if (i == 0) break;
    ans += COM(n - k, i) * mod_pow(i, n, MOD) % MOD * flag;
    ans += MOD * 10;
    ans %= MOD;
    flag *= -1;
  }
  ans = ans * 2 % MOD;
  ans *= COM(n, n - k);
  ans %= MOD;
  cout << ans << endl;
  return 0;
}
