#include <bits/stdc++.h>
using namespace std;
long long int f[200001], fi[200001];
long long int m = 998244353;
long long int power(long long int n, long long int p) {
  if (p == 0) return 1;
  long long int z = power(n, p >> 1);
  z = (z * z) % m;
  return (p & 1) ? ((z * n) % m) : z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  if (k >= n)
    cout << "0";
  else {
    f[0] = 1;
    fi[0] = 1;
    for (long long int i = 1; i <= n; ++i) {
      f[i] = (f[i - 1] * i) % m;
      fi[i] = power(f[i], m - 2);
    }
    long long int r = n - k;
    long long int ans = 0;
    for (int i = 0; i <= r; ++i) {
      long long int g = (fi[i] * fi[r - i]) % m;
      g = (g * power(r - i, n)) % m;
      if (i & 1) g = m - g;
      ans += g;
    }
    ans %= m;
    ans = (ans * f[n]) % m;
    if (k) ans = (ans * 2ll) % m;
    ans = (ans * fi[k]) % m;
    ans %= m;
    ans = (ans + m) % m;
    cout << ans;
  }
  return 0;
}
