#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long inf = 1LL << 50;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, long long p) { return power(n, p - 2, p); }
long long facts[200001];
long long invpwr[200001];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin.exceptions(cin.failbit);
  long long n;
  long long k;
  cin >> n >> k;
  facts[0] = facts[1] = 1;
  invpwr[1] = invpwr[0] = 1;
  for (int i = 2; i <= n; i++) {
    facts[i] = (facts[i - 1] * i) % mod;
    invpwr[i] = modInverse(facts[i], mod);
  }
  long long need = n - k;
  if (need <= 0) {
    cout << "0\n";
    return 0;
  }
  if (need == n) {
    cout << facts[n] << "\n";
    return 0;
  }
  long long ans = facts[n] * invpwr[n - need] % mod * invpwr[need] % mod;
  long long temp = 0;
  for (int i = need; i > 0; i--) {
    if ((i - need) % 2) {
      temp = (temp + mod -
              facts[need] * invpwr[i] % mod * invpwr[need - i] % mod *
                  power(i, n, mod) % mod) %
             mod;
    } else {
      temp = (temp + facts[need] * invpwr[i] % mod * invpwr[need - i] % mod *
                         power(i, n, mod) % mod) %
             mod;
    }
  }
  ans = ans * temp * 2 % mod;
  cout << ans << "\n";
}
