結果

問題 No.2561 みんな大好きmod 998
ユーザー 👑 deuteridayodeuteridayo
提出日時 2023-10-26 22:05:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,318 ms / 4,000 ms
コード長 216 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 10,056 KB
最終ジャッジ日時 2023-11-05 13:19:40
合計ジャッジ時間 28,166 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,056 KB
testcase_01 AC 117 ms
10,056 KB
testcase_02 AC 29 ms
10,056 KB
testcase_03 AC 2,179 ms
10,056 KB
testcase_04 AC 2,074 ms
10,056 KB
testcase_05 AC 2,242 ms
10,056 KB
testcase_06 AC 2,147 ms
10,056 KB
testcase_07 AC 30 ms
10,056 KB
testcase_08 AC 30 ms
10,056 KB
testcase_09 AC 34 ms
10,056 KB
testcase_10 AC 29 ms
10,056 KB
testcase_11 AC 355 ms
10,056 KB
testcase_12 AC 29 ms
10,056 KB
testcase_13 AC 29 ms
10,056 KB
testcase_14 AC 29 ms
10,056 KB
testcase_15 AC 2,318 ms
10,056 KB
testcase_16 AC 30 ms
10,056 KB
testcase_17 AC 29 ms
10,056 KB
testcase_18 AC 30 ms
10,056 KB
testcase_19 AC 1,664 ms
10,056 KB
testcase_20 AC 31 ms
10,056 KB
testcase_21 AC 46 ms
10,056 KB
testcase_22 AC 29 ms
10,056 KB
testcase_23 AC 29 ms
10,056 KB
testcase_24 AC 29 ms
10,056 KB
testcase_25 AC 29 ms
10,056 KB
testcase_26 AC 477 ms
10,056 KB
testcase_27 AC 2,106 ms
10,056 KB
testcase_28 AC 588 ms
10,056 KB
testcase_29 AC 184 ms
10,056 KB
testcase_30 AC 510 ms
10,056 KB
testcase_31 AC 1,054 ms
10,056 KB
testcase_32 AC 260 ms
10,056 KB
testcase_33 AC 183 ms
10,056 KB
testcase_34 AC 2,043 ms
10,056 KB
testcase_35 AC 168 ms
10,056 KB
testcase_36 AC 171 ms
10,056 KB
testcase_37 AC 97 ms
10,056 KB
testcase_38 AC 365 ms
10,056 KB
testcase_39 AC 559 ms
10,056 KB
testcase_40 AC 562 ms
10,056 KB
testcase_41 AC 365 ms
10,056 KB
testcase_42 AC 641 ms
10,056 KB
testcase_43 AC 98 ms
10,056 KB
testcase_44 AC 269 ms
10,056 KB
testcase_45 AC 1,635 ms
10,056 KB
testcase_46 AC 231 ms
10,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
for cmb in itertools.combinations(A, K):
    if sum(cmb) % 998244353 <= sum(cmb) % 998:
        ans += 1

print(ans % 998)
0