#include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) using ll = long long; int ctoi(char c){return c-'0';} ll ctoll(char c){return c-'0';} int ans = 0; int n,k; vectora; void dfs(int index, int count, ll sum,vectorlist){ if(count == k ){ ll val1 = sum%998LL; ll val2 = sum%998244353LL; if(val2 <= val1){ ans++; ans%=998; /* rep(i,list.size()){ cout << list[i] << " "; } cout << endl; */ } return; } if(index >= n)return; dfs(index+1,count,sum,list); list.push_back(index+1); dfs(index+1,count+1,sum+a[index],list); return; } int main(){ cin >> n >> k; a.resize(n); rep(i,n)cin >> a[i]; dfs(0,0,0LL,{}); cout << ans << endl; }