結果
問題 | No.2561 みんな大好きmod 998 |
ユーザー |
![]() |
提出日時 | 2023-12-02 15:46:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 524 ms / 4,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 82,260 KB |
実行使用メモリ | 76,032 KB |
最終ジャッジ日時 | 2024-09-26 19:14:47 |
合計ジャッジ時間 | 8,823 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
from itertools import combinations N,K=map(int,input().split()) A=list(map(int,input().split())) L=[_ for _ in range(N)] C=combinations(L,K) ans=0 for c in C: s=0 for i in range(K): s+=A[c[i]] if(s%998244353<=s%998): ans+=1 print(ans%998)