#include <bits/stdc++.h>
using namespace std;
pair<long long, pair<long long, long long> > bezout(long long a, long long b) {
  long long x = 1, y = 0;
  long long xLast = 0, yLast = 1;
  long long q, r, m, n;
  while (a != 0) {
    q = b / a;
    r = b % a;
    m = xLast - q * x;
    n = yLast - q * y;
    xLast = x, yLast = y;
    x = m, y = n;
    b = a, a = r;
  }
  return make_pair(b, make_pair(xLast, yLast));
}
long long mul_inv(long long a, long long b) {
  pair<long long, pair<long long, long long> > r = bezout(a, b);
  if (r.first == 1) {
    return r.second.first;
  } else
    return 0;
}
const int mod = 998244353;
long long pm(int n, int k) {
  long long res = (k % 2) ? n : 1;
  if (k / 2) {
    long long r = pm(n, k / 2);
    res *= r;
    res %= mod;
    res *= r;
  }
  res %= mod;
  return res;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (k >= n) {
    printf("0\n");
    return 0;
  }
  vector<long long> facti(n + 1);
  facti[0] = 1;
  for (int i = (1); i < (n + 1); ++i) {
    facti[i] = (i * facti[i - 1]) % mod;
  }
  if (k == 0) {
    printf("%I64d\n", facti[n]);
    return 0;
  }
  k = n - k;
  long long snk = 0;
  for (int j = (1); j < (k + 1); ++j) {
    long long ta = ((k - j) % 2) ? (mod - 1) : 1;
    ta *= pm(j, n - 1);
    ta %= mod;
    ta *= pm(facti[j - 1], mod - 2);
    ta %= mod;
    ta *= pm(facti[k - j], mod - 2);
    snk += ta;
    snk %= mod;
  }
  for (int i = (1); i < (k + 1); ++i) {
    snk *= (n + 1 - i);
    snk %= mod;
  }
  snk *= 2;
  snk %= mod;
  printf("%I64d\n", snk);
}
