#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353ll;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  long long ans = 0;
  for (long long x = 1; x <= (a.back() + k - 2ll) / (k - 1); x++) {
    vector<long long> dp(n);
    vector<long long> pref(n, 1);
    for (long long i = 0; i < n; i++) {
      pref[i] = i + 1;
    }
    long long stop;
    for (long long cnt = 2; cnt <= k; cnt++) {
      stop = 0;
      dp.assign(n, 0);
      for (long long last = cnt - 1; last < n; last++) {
        while (stop < last && a[stop] <= a[last] - x) stop++;
        if (stop != 0) dp[last] = pref[stop - 1];
        dp[last] %= mod;
        if (cnt == k) ans += dp[last], ans %= mod;
      }
      pref[0] = dp[0];
      pref[0] %= mod;
      for (long long i = 1; i < n; i++) {
        pref[i] = pref[i - 1] + dp[i];
        pref[i] %= mod;
      }
    }
  }
  cout << ans << '\n';
}
