結果

問題 No.2561 みんな大好きmod 998
コンテスト
ユーザー ooaiu
提出日時 2026-11-07 19:18:07
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 488 ms / 4,000 ms
+ 484µs
コード長 231 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 88 ms
コンパイル使用メモリ 64,256 KB
実行使用メモリ 59,428 KB
最終ジャッジ日時 2026-11-07 19:18:34
合計ジャッジ時間 9,714 ms
ジャッジサーバーID
(参考情報)
judge7_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import combinations
M = lambda:map(int,input().split())
N,K=M()
A=list(M())
ans = 0
for i in combinations(range(N),K):
    sm = sum(A[j] for j in i)
    if sm % 998244353 <= sm % 998:
        ans += 1
print(ans%998)
0