結果
問題 | No.2561 みんな大好きmod 998 |
ユーザー |
![]() |
提出日時 | 2023-12-02 17:20:16 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 65,152 KB |
最終ジャッジ日時 | 2024-09-26 21:10:11 |
合計ジャッジ時間 | 4,090 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 44 |
ソースコード
from collections import productimport itertoolsN,K = map(int, input().split())A = list(map(int, input().split()))l = [ i for i in range(N) ]product = itertools.combinations(l, K)ans = 0for p in product:#print(p)s = 0for i in p:s += A[i]if s%998244353 <= s%998:ans += 1ans %= 998ans %= 998print(ans)