結果
| 問題 | No.2561 みんな大好きmod 998 |
| コンテスト | |
| ユーザー |
Cecil
|
| 提出日時 | 2023-12-02 15:38:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 320 bytes |
| 記録 | |
| コンパイル時間 | 658 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,248 KB |
| 最終ジャッジ日時 | 2024-09-26 19:02:54 |
| 合計ジャッジ時間 | 6,047 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 43 |
ソースコード
import itertools
N,K = map(int, input().split())
A = list(map(int, input().split()))
l = [ i for i in range(N) ]
product = itertools.combinations(l, K)
ans = 0
for p in product:
#print(p)
s = 0
for i in p:
s += A[i]
if s%998244353 <= s%998:
ans += 1
ans %= 998
ans %= 998
print(ans)
Cecil