結果
| 問題 | No.2561 みんな大好きmod 998 | 
| コンテスト | |
| ユーザー |  rotti_coder | 
| 提出日時 | 2023-11-21 01:23:11 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1,674 ms / 4,000 ms | 
| コード長 | 325 bytes | 
| コンパイル時間 | 418 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 486,560 KB | 
| 最終ジャッジ日時 | 2024-09-26 06:49:55 | 
| 合計ジャッジ時間 | 19,789 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 44 | 
ソースコード
from itertools import combinations
n,k=map(int,input().split())
s=list(map(int,input().split()))
A=[]
for i in range(n):
  A.append(i)
box=list(combinations(A,k))
ans=0
for i in range(len(box)):
  hako=box[i]
  count=0
  for ipp in range(k):
    count+=s[hako[ipp]]
  if count%998244353<=count%998:
    ans+=1
print(ans%998)
            
            
            
        