#include <bits/stdc++.h>
using namespace std;
constexpr int64_t kMod = 998244353;
int Calculate(const vector<int>& a, int k, int x) {
  vector<int> ans(a.size(), 1);
  for (int len = 2; len <= k; ++len) {
    int l = 0;
    int sum = 0;
    vector<int> new_ans(a.size(), 0);
    new_ans[0] = 0;
    for (int r = 1; r < a.size(); ++r) {
      while (a[r] >= a[l] + x) {
        sum = (sum + ans[l]) % kMod;
        ++l;
      }
      new_ans[r] = sum;
    }
    ans = new_ans;
  }
  int res = 0;
  for (int i = 0; i < a.size(); ++i) {
    res = (res + ans[i]) % kMod;
  }
  return res;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (auto&& e : a) {
    cin >> e;
  }
  sort(begin(a), end(a));
  int res = 0;
  for (int x = 1; x <= (10 + a.back()) / (k - 1); ++x) {
    res = (res + Calculate(a, k, x)) % kMod;
  }
  cout << res << endl;
  return 0;
}
