結果
| 問題 |
No.2561 みんな大好きmod 998
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-07-15 22:43:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 440 ms / 4,000 ms |
| コード長 | 228 bytes |
| コンパイル時間 | 427 ms |
| コンパイル使用メモリ | 82,352 KB |
| 実行使用メモリ | 76,032 KB |
| 最終ジャッジ日時 | 2024-07-15 22:44:02 |
| 合計ジャッジ時間 | 9,056 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
ソースコード
from itertools import combinations
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
for cs in combinations(A, K):
s = sum(cs)
if s % 998244353 <= s % 998:
ans += 1
print(ans % 998)
norioc