結果

問題 No.2561 みんな大好きmod 998
ユーザー loop0919loop0919
提出日時 2023-11-05 23:27:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 513 ms / 4,000 ms
コード長 237 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 81,872 KB
実行使用メモリ 75,656 KB
最終ジャッジ日時 2023-11-05 23:27:58
合計ジャッジ時間 9,863 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,616 KB
testcase_01 AC 75 ms
75,560 KB
testcase_02 AC 36 ms
53,616 KB
testcase_03 AC 490 ms
75,584 KB
testcase_04 AC 479 ms
75,520 KB
testcase_05 AC 513 ms
75,520 KB
testcase_06 AC 485 ms
75,584 KB
testcase_07 AC 38 ms
53,616 KB
testcase_08 AC 37 ms
53,616 KB
testcase_09 AC 47 ms
66,468 KB
testcase_10 AC 37 ms
53,616 KB
testcase_11 AC 125 ms
75,548 KB
testcase_12 AC 36 ms
53,616 KB
testcase_13 AC 37 ms
53,616 KB
testcase_14 AC 37 ms
53,616 KB
testcase_15 AC 500 ms
75,656 KB
testcase_16 AC 37 ms
53,616 KB
testcase_17 AC 36 ms
53,616 KB
testcase_18 AC 41 ms
59,132 KB
testcase_19 AC 387 ms
75,648 KB
testcase_20 AC 45 ms
62,368 KB
testcase_21 AC 36 ms
53,616 KB
testcase_22 AC 36 ms
53,616 KB
testcase_23 AC 42 ms
59,132 KB
testcase_24 AC 36 ms
53,616 KB
testcase_25 AC 40 ms
53,616 KB
testcase_26 AC 146 ms
75,552 KB
testcase_27 AC 482 ms
75,580 KB
testcase_28 AC 198 ms
75,560 KB
testcase_29 AC 91 ms
75,548 KB
testcase_30 AC 156 ms
75,560 KB
testcase_31 AC 269 ms
75,584 KB
testcase_32 AC 102 ms
75,548 KB
testcase_33 AC 89 ms
75,548 KB
testcase_34 AC 510 ms
75,580 KB
testcase_35 AC 81 ms
75,552 KB
testcase_36 AC 81 ms
75,552 KB
testcase_37 AC 65 ms
75,548 KB
testcase_38 AC 117 ms
75,548 KB
testcase_39 AC 162 ms
75,560 KB
testcase_40 AC 162 ms
75,564 KB
testcase_41 AC 123 ms
75,548 KB
testcase_42 AC 186 ms
75,556 KB
testcase_43 AC 65 ms
75,548 KB
testcase_44 AC 99 ms
75,548 KB
testcase_45 AC 364 ms
75,580 KB
testcase_46 AC 92 ms
75,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations

N, K = map(int, input().split())
A = list(map(int, input().split()))

ans = 0
for cmb in combinations(A, K):
    S = sum(cmb)
    if  S % 998244353 <= S % 998:
        ans = (ans + 1) % 998

print(ans)
0