#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005, P = 998244353;
int n, k;
int a[maxn], dp[maxn][maxn], cnt[100010];
int solve(int t) {
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= k; ++j) dp[i][j] = 0;
  int p = 0;
  for (int i = 1; i <= n; ++i) {
    dp[i][1] = i;
    while (a[i] - a[p + 1] >= t) ++p;
    for (int j = 2; j <= min(k, i); ++j) {
      dp[i][j] = (dp[i - 1][j] + dp[p][j - 1]) % P;
    }
  }
  return dp[n][k];
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int ans = 0;
  for (int i = 1; i <= 100000 / (k - 1) + 5; ++i) cnt[i] = solve(i);
  for (int i = 1; i <= 100000; ++i)
    ans = (ans + 1LL * ((cnt[i] - cnt[i + 1] + P) % P) * i % P) % P;
  printf("%d\n", ans);
  return 0;
}
