#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll mod = 998244353;
ll pw(ll a, ll b) {
  ll res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a % mod;
    }
    b /= 2;
    a = a * a % mod;
  }
  return res;
}
int main() {
  ll mod = 998244353;
  ll n, k;
  cin >> n >> k;
  ll ans = 1;
  if (k == 0) {
    for (ll i = 1; i <= n; i++) {
      ans = ans * i % mod;
    }
    cout << ans << endl;
    return 0;
  }
  if (k >= n) {
    cout << 0 << endl;
    return 0;
  }
  ll sum = 0;
  vector<ll> f(n + 1);
  f[0] = 1;
  for (ll i = 1; i <= n; i++) {
    f[i] = f[i - 1] * i % mod;
  }
  ll L = n - k;
  for (ll i = 1; i <= L; i++) {
    ll delta = f[L] * pw(f[i] * f[L - i] % mod, mod - 2) % mod * pw(i, n);
    if (L % 2 == i % 2) {
      sum = (sum + delta) % mod;
    } else {
      sum = (sum - delta) % mod;
    }
  }
  ans = sum * 2;
  ans = ans * f[n] % mod * pw(f[k] * f[n - k] % mod, mod - 2) % mod;
  if (ans < 0) {
    ans += mod;
  }
  cout << ans << endl;
}
