#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) {
      ans = (ans * a) % 998244353;
    }
    a = (a * a) % 998244353;
    b >>= 1;
  }
  return ans;
}
long long fact[200005], fact_inv[200005];
void pre() {
  fact[0] = 1;
  fact_inv[0] = 1;
  for (long long i = 1; i < 200005; i++) {
    fact[i] = fact[i - 1] * i;
    fact[i] %= 998244353;
    fact_inv[i] = power(fact[i], 998244353 - 2);
  }
}
long long ncr(long long n, long long r) {
  if (n < 0) return 1;
  if (n < r) {
    return 0;
  }
  if (n == r || r == 0) {
    return 1;
  }
  return (((fact[n] * fact_inv[n - r]) % 998244353) * fact_inv[r]) % 998244353;
}
void swap(long long int &x, long long int &y) {
  x = x ^ y;
  y = x ^ y;
  x = x ^ y;
}
template <typename T>
void print(T a) {
  for (auto i = a.begin(); i != a.end(); i++) cout << *i << " ";
  cout << endl;
}
bool isVowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
  return false;
}
void sync() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  sync();
  pre();
  long long int n, k;
  cin >> n >> k;
  if (k > n - 1) {
    cout << 0 << endl;
    return 0;
  }
  if (k == 0) {
    cout << fact[n] << endl;
    return 0;
  }
  long long int fin = 0;
  long long int c = n - k;
  long long int j = 1;
  for (long long int i = 0; i <= c; i++) {
    if (j == 1)
      fin += ((ncr(c, c - i)) * power(c - i, n));
    else {
      long long int fin1 = ncr(c, c - i) * power(c - i, n);
      fin = fin + (998244353 - fin1);
      fin %= 998244353;
    }
    j = -1 * j;
  }
  fin *= ncr(n, c);
  fin %= 998244353;
  fin *= 2;
  fin %= 998244353;
  cout << fin << endl;
}
