#include <bits/stdc++.h>
using namespace std;
long long int mod = 998244353;
long long int fac[200009];
long long int inv[200009];
long long int fast(long long int x, long long int n) {
  if (n == 0) return 1;
  long long int z = fast(x, n / 2);
  if (n % 2 == 0) return (z * z) % mod;
  return (((z * z) % mod) * x) % mod;
}
int main() {
  fac[0] = 1;
  int n, k;
  cin >> n >> k;
  if (k > n) {
    cout << "0\n";
    return 0;
  }
  for (int i = 1; i <= 200005; i++) fac[i] = (i * fac[i - 1]) % mod;
  if (k == 0) {
    cout << fac[n];
    return 0;
  }
  if (n == k) {
    cout << "0\n";
    return 0;
  }
  inv[1] = 1;
  inv[0] = 1;
  for (int i = 2; i <= 200005; i++)
    inv[i] = (mod - ((mod / i) * inv[mod % i]) % mod) % mod;
  for (int i = 2; i <= 200005; i++) inv[i] = (inv[i] * inv[i - 1]) % mod;
  long long int ans = ((2 * (fac[n] * inv[k]) % mod * inv[n - k]) % mod) % mod;
  int sign = 1;
  long long int val = 0;
  for (int i = 0; i <= n - k; i++) {
    val = (val +
           sign *
               (((fast(n - k - i, n) * fac[n - k]) % mod * inv[i]) % mod *
                inv[n - k - i]) %
               mod +
           mod) %
          mod;
    sign = -1 * sign;
  }
  cout << (ans * val + mod) % mod;
}
