#include <bits/stdc++.h>
using namespace std;
int n, k, mod = 998244353;
vector<int> a;
int solve(int x) {
  if (x > a.back() / (k - 1)) return 0;
  vector<int> dp(n + 1, 1);
  dp.back() = 0;
  for (int itt = 2; itt <= k; itt++) {
    for (int i = n - 1; i >= 0; i--) {
      dp[i] += dp[i + 1];
      if (dp[i] >= mod) dp[i] -= mod;
    }
    vector<int> new_dp(n + 1);
    int pt = n;
    for (int i = n - 1; i >= 0; i--) {
      while (a[i] + x <= a[pt - 1]) pt--;
      new_dp[i] = dp[pt];
    }
    dp = new_dp;
  }
  int ret = 0;
  for (auto &i : dp) {
    ret += i;
    if (ret >= mod) ret -= mod;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  a.resize(n);
  for (auto &i : a) cin >> i;
  sort(a.begin(), a.end());
  int ans = 0;
  for (int i = 1; i <= a.back(); i++) {
    ans += solve(i);
    if (ans >= mod) ans -= mod;
  }
  cout << ans << endl;
}
