結果
| 問題 |
No.2561 みんな大好きmod 998
|
| コンテスト | |
| ユーザー |
Rusty
|
| 提出日時 | 2023-12-02 14:54:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 341 bytes |
| コンパイル時間 | 282 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 383,360 KB |
| 最終ジャッジ日時 | 2024-09-26 17:41:21 |
| 合計ジャッジ時間 | 6,153 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 43 |
ソースコード
import itertools
n,k = map(int,input().split())
a = list(map(int,input().split()))
nl = [i for i in range(n)]
ans = 0
for comb in list(itertools.combinations(nl,k)):
s = 0
for i in list(comb):
s += a[i]
s998 = s % 998
s9982 = s % 998244353
if s9982 <= s998:
ans += 1
print(ans % 998)
Rusty