import std, core.bitop; string[] _R; void readM(T)(ref T x) { while (_R.empty) { _R = readln.chomp.split; } x = _R.front.to!T; _R.popFront; } bool chmin(T)(ref T A, T B) { if (A > B) { A = B; return true; } else { return false; } } bool chmax(T)(ref T A, T B) { if (A < B) { A = B; return true; } else { return false; } } int lowerBound(T)(T[] A, T x) { int lo = -1, hi = cast(int)(A.length); while (hi - lo > 1) { int mid = lo + hi >> 1; (A[mid] < x ? lo : hi) = mid; } return hi; } int upperBound(T)(T[] A, T x) { int lo = -1, hi = cast(int)(A.length); while (hi - lo > 1) { int mid = lo + hi >> 1; (A[mid] > x ? hi : lo) = mid; } return hi; } void main() { int N, K; N.readM; K.readM; auto A = new int[N]; foreach (i; 0 .. N) { A[i].readM; } auto O = new bool[N]; foreach (i; 0 .. K) { O[N - 1 - i] = true; } int ans; do { long x; foreach (i; 0 .. N) { if (O[i]) { x += A[i]; } } if (x % 998244353 <= x % 998) { ++ans; } } while (O.nextPermutation); ans %= 998; writeln(ans); }