結果

問題 No.2561 みんな大好きmod 998
ユーザー loop0919loop0919
提出日時 2023-10-26 23:02:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 870 ms / 4,000 ms
コード長 234 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 81,888 KB
実行使用メモリ 75,708 KB
最終ジャッジ日時 2023-11-05 13:19:35
合計ジャッジ時間 12,160 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,608 KB
testcase_01 AC 82 ms
75,588 KB
testcase_02 AC 35 ms
53,608 KB
testcase_03 AC 709 ms
75,636 KB
testcase_04 AC 745 ms
75,504 KB
testcase_05 AC 742 ms
75,504 KB
testcase_06 AC 738 ms
75,512 KB
testcase_07 AC 40 ms
58,956 KB
testcase_08 AC 35 ms
53,608 KB
testcase_09 AC 49 ms
70,460 KB
testcase_10 AC 35 ms
53,608 KB
testcase_11 AC 152 ms
75,460 KB
testcase_12 AC 35 ms
53,608 KB
testcase_13 AC 36 ms
53,608 KB
testcase_14 AC 37 ms
56,908 KB
testcase_15 AC 739 ms
75,708 KB
testcase_16 AC 38 ms
58,956 KB
testcase_17 AC 39 ms
53,608 KB
testcase_18 AC 40 ms
59,128 KB
testcase_19 AC 506 ms
75,700 KB
testcase_20 AC 49 ms
64,308 KB
testcase_21 AC 34 ms
53,608 KB
testcase_22 AC 33 ms
53,608 KB
testcase_23 AC 38 ms
59,128 KB
testcase_24 AC 32 ms
53,608 KB
testcase_25 AC 37 ms
53,608 KB
testcase_26 AC 208 ms
75,452 KB
testcase_27 AC 682 ms
75,508 KB
testcase_28 AC 228 ms
75,468 KB
testcase_29 AC 119 ms
75,452 KB
testcase_30 AC 251 ms
75,472 KB
testcase_31 AC 382 ms
75,484 KB
testcase_32 AC 132 ms
75,448 KB
testcase_33 AC 107 ms
75,448 KB
testcase_34 AC 870 ms
75,508 KB
testcase_35 AC 108 ms
75,452 KB
testcase_36 AC 105 ms
75,452 KB
testcase_37 AC 84 ms
75,448 KB
testcase_38 AC 154 ms
75,452 KB
testcase_39 AC 271 ms
75,472 KB
testcase_40 AC 231 ms
75,472 KB
testcase_41 AC 151 ms
75,460 KB
testcase_42 AC 233 ms
75,452 KB
testcase_43 AC 76 ms
75,448 KB
testcase_44 AC 123 ms
75,460 KB
testcase_45 AC 550 ms
75,492 KB
testcase_46 AC 125 ms
75,448 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):
    if  sum(cmb) % 998244353 <= sum(cmb) % 998:
        ans = (ans + 1) % 998

print(ans)
0