結果

問題 No.2561 みんな大好きmod 998
ユーザー ymskskyymsksky
提出日時 2024-04-09 22:53:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 465 ms / 4,000 ms
コード長 243 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 76,080 KB
最終ジャッジ日時 2024-04-09 22:53:39
合計ジャッジ時間 7,983 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,388 KB
testcase_01 AC 61 ms
75,948 KB
testcase_02 AC 34 ms
52,872 KB
testcase_03 AC 365 ms
75,604 KB
testcase_04 AC 442 ms
75,812 KB
testcase_05 AC 373 ms
75,596 KB
testcase_06 AC 382 ms
75,908 KB
testcase_07 AC 35 ms
54,476 KB
testcase_08 AC 35 ms
52,108 KB
testcase_09 AC 45 ms
65,224 KB
testcase_10 AC 34 ms
52,884 KB
testcase_11 AC 98 ms
76,080 KB
testcase_12 AC 39 ms
53,480 KB
testcase_13 AC 37 ms
52,136 KB
testcase_14 AC 41 ms
52,904 KB
testcase_15 AC 412 ms
75,936 KB
testcase_16 AC 34 ms
53,144 KB
testcase_17 AC 33 ms
52,836 KB
testcase_18 AC 38 ms
58,104 KB
testcase_19 AC 294 ms
76,032 KB
testcase_20 AC 44 ms
62,156 KB
testcase_21 AC 35 ms
52,724 KB
testcase_22 AC 35 ms
52,076 KB
testcase_23 AC 38 ms
59,672 KB
testcase_24 AC 33 ms
52,128 KB
testcase_25 AC 32 ms
53,020 KB
testcase_26 AC 137 ms
75,756 KB
testcase_27 AC 421 ms
75,736 KB
testcase_28 AC 142 ms
75,812 KB
testcase_29 AC 78 ms
76,024 KB
testcase_30 AC 131 ms
76,008 KB
testcase_31 AC 211 ms
75,588 KB
testcase_32 AC 84 ms
75,808 KB
testcase_33 AC 77 ms
75,788 KB
testcase_34 AC 465 ms
75,796 KB
testcase_35 AC 76 ms
75,828 KB
testcase_36 AC 74 ms
76,060 KB
testcase_37 AC 63 ms
75,604 KB
testcase_38 AC 100 ms
75,740 KB
testcase_39 AC 127 ms
75,544 KB
testcase_40 AC 137 ms
75,784 KB
testcase_41 AC 97 ms
75,752 KB
testcase_42 AC 140 ms
75,536 KB
testcase_43 AC 61 ms
75,540 KB
testcase_44 AC 106 ms
75,748 KB
testcase_45 AC 341 ms
75,864 KB
testcase_46 AC 83 ms
75,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations

n, k = map(int, input().split())
al = list(map(int, input().split()))
mod0 = 998
mod1 = 998244353
ans = 0
for comb in combinations(al, k):
    s = sum(comb)
    ans += s % mod0 >= s % mod1
print(ans % mod0)
0