結果
| 問題 |
No.2561 みんな大好きmod 998
|
| コンテスト | |
| ユーザー |
ありあけ
|
| 提出日時 | 2024-09-19 20:05:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 3,159 ms / 4,000 ms |
| コード長 | 238 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 378,240 KB |
| 最終ジャッジ日時 | 2024-09-19 20:06:03 |
| 合計ジャッジ時間 | 38,653 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
ソースコード
from itertools import combinations
N,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(combinations(A,K))
ans = 0
for b in B:
if sum(b)%998244353 <= sum(b)%998:
ans += 1
ans = ans % 998
print(ans)
ありあけ