#include <bits/stdc++.h>
using namespace std;
typedef struct node {
  long long int val, more = 0, less = 0;
  bool operator<(const node& a) { return val < a.val; }
} node;
const int sz = 1e5 + 5;
const int M = 998244353;
vector<int> prime;
void seive(int n) {
  int sqn = sqrt(n), sq2n = sqrt(sqn);
  bool isprime[sqn + 1];
  memset(isprime, 1, sizeof(isprime));
  for (int i = 2; i <= sq2n; ++i) {
    if (isprime[i])
      for (int j = i << 1; j <= sqn; j += i) isprime[j] = 0;
  }
  for (int i = 2; i <= sqn; ++i)
    if (isprime[i]) prime.push_back(i);
  for (int i = sqn; i < n; i += sqn) {
    memset(isprime, 1, sizeof(isprime));
    sq2n = sqrt(i + sqn);
    for (int p : prime) {
      if (p > sq2n) break;
      for (int j = (i / p + 1) * p; j <= i + sqn; j += p) isprime[j - i] = 0;
    }
    for (int j = 1; j <= sqn; ++j)
      if (isprime[j]) prime.push_back(j + i);
  }
}
long long int pow_mod(long long int base, long long int pow) {
  long long int ans = 1;
  while (pow) {
    if (pow & 1) ans = ans * base % M;
    base = base * base % M;
    pow >>= 1;
  }
  return ans;
}
long long int fac[200005];
long long int inv_fac[200005];
void factorial(int n) {
  fac[0] = fac[1] = 1;
  for (int i = 2; i <= n; ++i) fac[i] = fac[i - 1] * i % M;
  inv_fac[n] = pow_mod(fac[n], M - 2);
  for (int i = n - 1; i >= 0; --i) {
    inv_fac[i] = inv_fac[i + 1] * (i + 1) % M;
  }
}
long long int multinomial(vector<int>& list) {
  long long int sum = 0, ans = 1;
  for (int i = 0; i < list.size(); ++i) {
    sum += list[i];
    ans = ans * inv_fac[list[i]] % M;
  }
  ans = ans * fac[sum] % M;
  return ans;
}
void solve() {
  int n, k;
  cin >> n >> k;
  int row = n - k;
  factorial(n);
  if (row < 0) {
    cout << 0;
  } else if (row == n) {
    cout << fac[n];
  } else {
    long long int ans = 0;
    int one = 1;
    for (int i = 0; i < row; ++i) {
      ans = (ans +
             one * pow_mod(row - i, n) * inv_fac[i] % M * inv_fac[row - i] % M +
             M) %
            M;
      one *= -1;
    }
    ans = (ans * fac[n] % M * inv_fac[n - row] % M);
    cout << ans * 2 % M;
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
