#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 100;
const long long mod = 998244353;
const long long inf = 1e18;
long long n, k, f[maxn], fp[maxn], ans, x, t;
long long pw(long long pa, long long push_back) {
  if (push_back == 0) return 1;
  long long pc = pw(pa, push_back / 2);
  pc = (pc * pc) % mod;
  if (push_back % 2) pc = (pc * pa) % mod;
  return pc;
}
long long C(long long ca, long long cb) {
  if (cb < 0 || cb > ca) return 0;
  return (((f[ca] * fp[cb]) % mod) * fp[ca - cb]) % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k;
  f[0] = 1;
  fp[0] = 1;
  for (long long i = 1; i < maxn; i++) {
    f[i] = (f[i - 1] * i) % mod;
    fp[i] = pw(f[i], mod - 2);
  }
  if (k == 0) {
    cout << f[n];
    return 0;
  }
  if (k >= n) {
    cout << 0;
    return 0;
  }
  ans = 2 * C(n, k);
  t = n - k;
  x = 0;
  for (long long i = 0; i < t; i++) {
    if (i % 2)
      x = (x - C(t, i) * pw(t - i, n)) % mod;
    else
      x = (x + C(t, i) * pw(t - i, n)) % mod;
  }
  x = (x + mod) % mod;
  cout << (ans * x) % mod;
  return 0;
}
