結果

問題 No.2561 みんな大好きmod 998
ユーザー loop0919loop0919
提出日時 2023-10-26 23:02:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,028 ms / 4,000 ms
コード長 234 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 76,160 KB
最終ジャッジ日時 2024-09-25 22:27:35
合計ジャッジ時間 15,048 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations

N, K = map(int, input().split())
A = list(map(int, input().split()))

ans = 0
for cmb in combinations(A, K):
    if  sum(cmb) % 998244353 <= sum(cmb) % 998:
        ans = (ans + 1) % 998

print(ans)
0