結果
問題 |
No.2561 みんな大好きmod 998
|
ユーザー |
|
提出日時 | 2023-12-02 15:06:39 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 366 bytes |
コンパイル時間 | 520 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 81,280 KB |
最終ジャッジ日時 | 2024-09-26 18:04:35 |
合計ジャッジ時間 | 6,615 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 43 |
ソースコード
n,k = map(int,input().split()) a = list(map(int,input().split())) ans = 0 for i in range(2**n): now = [] cnt = 0 for j in range(n): if (i>>j & 1 == 1): cnt += 1 now.append(a[j]) if len(now) != k: continue total = sum(now) if total%998244353 <= total%998: ans += 1 ans %= 998 print(ans)