#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
long long power(long long a, long long b, long long mod = MOD) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans * a) % mod;
    }
    a = (a * a) % mod;
    b = b >> 1;
  }
  return ans;
}
const double PI = 3.14159265359;
const long long INF = 1e18 + 9;
const int nax = 200005;
vector<long long> fact(nax, 1);
long long inv(long long n) { return power(n, MOD - 2); }
long long nCr(long long n, long long r) {
  if (n < r) return 0;
  long long ans = fact[n];
  ans = (ans * inv(fact[r])) % MOD;
  ans = (ans * inv(fact[n - r])) % MOD;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    if (k > n - 1) {
      cout << "0";
      return 0;
    }
    for (int i = 1; i < nax; i++) {
      fact[i] = (fact[i - 1] * i) % MOD;
    }
    if (k == 0) {
      cout << fact[n];
      return 0;
    }
    long long c = n - k;
    long long ans = 0;
    for (int i = 0; i <= c; i++) {
      if (i & 1) {
        ans = (ans - (nCr(c, i) * power(c - i, n)) % MOD + MOD) % MOD;
      } else {
        ans = (ans + (power(c - i, n) * nCr(c, i)) % MOD) % MOD;
      }
    }
    ans = (ans * nCr(n, c)) % MOD;
    ans = (2 * ans) % MOD;
    cout << ans;
  }
  return 0;
}
