#include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 998244353;
constexpr int MAXN = 1e5 + 10;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
ll N, M, K, T;
ll A[MAXN];
ll memos[MAXN];
ll pre_sum[MAXN];
int pre_idx[MAXN];
ll Solution() {
  sort(A, A + N);
  memset(pre_idx, 0, sizeof(pre_idx));
  for (int i = (int)(0); i < (int)(N); ++i) pre_idx[A[i]]++;
  for (int i = (int)(1); i < (int)(MAXN); ++i) pre_idx[i] += pre_idx[i - 1];
  ll maxi = A[N - 1];
  ll ans = 0;
  for (int p = (int)(1); p < (int)(maxi / (K - 1) + 1); ++p) {
    pre_sum[0] = 1;
    for (int i = (int)(1); i < (int)(N); ++i) {
      pre_sum[i] = pre_sum[i - 1] + 1;
    }
    for (int i = (int)(2); i < (int)(K + 1); ++i) {
      for (int j = (int)(0); j < (int)(N); ++j) {
        memos[j] = 0;
        int g = A[j] - p >= 0 ? pre_idx[A[j] - p] : 0;
        if (g != 0) {
          memos[j] = pre_sum[g - 1];
        }
      }
      pre_sum[0] = memos[0];
      for (int j = (int)(1); j < (int)(N); ++j) {
        pre_sum[j] = (pre_sum[j - 1] + memos[j]) % MOD;
      }
    }
    ans += pre_sum[N - 1];
    ans %= MOD;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  while (cin >> N >> K) {
    for (int i = (int)(0); i < (int)(N); ++i) cin >> A[i];
    cout << Solution() << '\n';
  }
  return 0;
}
