#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  int ans = 0;
  for (int x = 1; x <= a[n] / (k - 1); x++) {
    vector<vector<int>> presum(k + 1, vector<int>(n + 1));
    for (int i = 0; i <= n; i++) {
      presum[0][i] = 1;
    }
    for (int j = 1; j <= k; j++) {
      int p = 0;
      for (int i = j; i <= n; i++) {
        while (a[p + 1] + x <= a[i]) {
          p++;
        }
        (presum[j][i] += presum[j - 1][p] + presum[j][i - 1]) %= mod;
      }
    }
    (ans += presum[k][n]) %= mod;
  }
  cout << ans << endl;
  return 0;
}
