#include <bits/stdc++.h>
using namespace std;
long long date[100010], dp[1001][1001], mod = 998244353;
int main() {
  long long n, k, sol = 0;
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) cin >> date[i];
  sort(date + 1, date + n + 1);
  long long h = 0;
  for (long long x = date[n] / (k - 1); x >= 1; x--) {
    for (long long i = 1; i <= k; i++)
      for (long long j = 1; j <= n; j++) dp[i][j] = 0;
    for (long long i = 1; i <= n; i++) dp[1][i] = 1;
    long long sum = 0;
    for (long long i = 2; i <= k; i++) {
      sum = 0;
      long long p = i - 1;
      for (long long j = i; j <= n; j++) {
        while (date[j] - date[p] >= x) sum += dp[i - 1][p], p++, sum %= mod;
        dp[i][j] = sum;
      }
    }
    if (x == 9) {
      sum = 0;
    }
    sum = 0;
    for (long long i = k; i <= n; i++) sum = sum + dp[k][i], sum %= mod;
    long long y = sum - h;
    if (y < 0) y += mod;
    sol = sol + y * x % mod;
    sol %= mod;
    h = sum;
  }
  cout << sol;
  return 0;
}
