結果
問題 | No.2561 みんな大好きmod 998 |
ユーザー |
👑 |
提出日時 | 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 |
ソースコード
from itertools import combinationsN, K = map(int, input().split())A = list(map(int, input().split()))ans = 0for cmb in combinations(A, K):if sum(cmb) % 998244353 <= sum(cmb) % 998:ans = (ans + 1) % 998print(ans)