#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long MOD(long long first) {
  if (first >= mod) return first % mod;
  if (first < 0) return first % mod + mod;
  return first;
}
long long bp(long long a, long long b) {
  if (!a) return 0;
  long long res = a, i, ans = 1;
  for (i = 1; i <= b; i <<= 1, res = MOD(res * res)) {
    if (i & b) ans = MOD(ans * res);
  }
  return ans;
}
long long fac[200005], inv[200005];
int main() {
  int i, j, l, a, b, c, d;
  long long k;
  fac[0] = inv[0] = 1;
  for (int i = (1); i <= (200000); ++i) {
    fac[i] = MOD(fac[i - 1] * i);
    inv[i] = bp(fac[i], mod - 2);
  }
  int n;
  scanf("%d%lld", &n, &k);
  if (k == 0) {
    printf("%lld", fac[n]);
    return 0;
  } else if (n <= k) {
    printf("0");
    return 0;
  }
  k = n - k;
  long long ans = 0;
  for (int i = (0); i <= (k); ++i) {
    long long s = 1;
    if (i & 1) s = -1;
    long long sum =
        s * MOD(bp(k - i, n) * MOD(fac[k] * MOD(inv[k - i] * inv[i])));
    ans = MOD(ans + sum);
  }
  ans = MOD(ans * 2);
  ans = MOD(ans * MOD(fac[n] * MOD(inv[k] * inv[n - k])));
  printf("%lld", ans);
  return 0;
}
