結果

問題 No.2561 みんな大好きmod 998
コンテスト
ユーザー sasa8uyauya
提出日時 2024-09-06 17:33:35
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 533 ms / 4,000 ms
+ 602µs
コード長 205 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 278 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 84,736 KB
最終ジャッジ日時 2026-08-25 11:49:12
合計ジャッジ時間 11,496 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n,k=map(int,input().split())
a=list(map(int,input().split()))
from itertools import combinations
c=0
for p in combinations(list(range(n)),k):
	s=sum(a[i] for i in p)
	c+=(s%998244353)<=(s%998)
print(c%998)
0