#include <bits/stdc++.h>
using namespace std;
mt19937 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
const long double PI = 3.141592653589793;
const long long INF = 9223372036854775807ll;
const long long mod = 998244353;
const int N = 2e5 + 2;
long long fact[N];
long long inv[N];
long long modexp(long long x, long long ex) {
  long long ans = 1ll;
  while (ex > 0) {
    if (ex & 1ll) ans = (ans * x) % mod;
    ex >>= 1ll;
    x = (x * x) % mod;
  }
  return ans;
}
long long ncr(long long n, long long r) {
  long long res = fact[n];
  res *= inv[n - r];
  res %= mod;
  res *= inv[r];
  res %= mod;
  return res;
}
long long modinv(long long x) {
  long long ans = 1, ex = mod - 2;
  while (ex > 0) {
    if (ex & 1ll) {
      ans = (ans * x) % mod;
    }
    ex >>= 1ll;
    x = (x * x) % mod;
  }
  return ans;
}
void solve() {
  long long n, k;
  cin >> n >> k;
  fact[0] = 1;
  inv[0] = 1;
  for (int i = 1; i < N; ++i) {
    fact[i] = fact[i - 1] * i;
    fact[i] %= mod;
    inv[i] = modinv(fact[i]);
  }
  if (k >= n) {
    cout << 0 << '\n';
    return;
  }
  if (!k) {
    cout << fact[n] << '\n';
    return;
  }
  long long color = n - k;
  long long pr = 0;
  for (int i = 1; i <= color; ++i) {
    long long res = ncr(color, i) * modexp(i, n);
    res %= mod;
    if ((color - i) % 2)
      pr -= res;
    else
      pr += res;
    if (pr < 0)
      pr += mod;
    else
      pr %= mod;
  }
  pr *= 2ll;
  pr %= mod;
  pr *= ncr(n, color);
  pr %= mod;
  cout << pr << '\n';
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  solve();
  return 0;
}
