結果

問題 No.2561 みんな大好きmod 998
ユーザー navel_tosnavel_tos
提出日時 2023-12-02 14:43:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 715 ms / 4,000 ms
コード長 274 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,036 KB
最終ジャッジ日時 2023-12-02 14:43:59
合計ジャッジ時間 11,187 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 85 ms
75,656 KB
testcase_02 AC 33 ms
53,460 KB
testcase_03 AC 715 ms
75,784 KB
testcase_04 AC 678 ms
75,652 KB
testcase_05 AC 694 ms
75,652 KB
testcase_06 AC 674 ms
75,652 KB
testcase_07 AC 35 ms
53,460 KB
testcase_08 AC 32 ms
53,460 KB
testcase_09 AC 56 ms
68,464 KB
testcase_10 AC 33 ms
53,460 KB
testcase_11 AC 143 ms
75,516 KB
testcase_12 AC 34 ms
53,460 KB
testcase_13 AC 34 ms
53,460 KB
testcase_14 AC 33 ms
53,460 KB
testcase_15 AC 677 ms
76,036 KB
testcase_16 AC 35 ms
53,460 KB
testcase_17 AC 33 ms
53,460 KB
testcase_18 AC 40 ms
59,608 KB
testcase_19 AC 534 ms
75,908 KB
testcase_20 AC 51 ms
64,348 KB
testcase_21 AC 36 ms
53,460 KB
testcase_22 AC 35 ms
53,460 KB
testcase_23 AC 42 ms
59,608 KB
testcase_24 AC 38 ms
53,460 KB
testcase_25 AC 35 ms
53,460 KB
testcase_26 AC 180 ms
75,516 KB
testcase_27 AC 698 ms
75,652 KB
testcase_28 AC 222 ms
75,516 KB
testcase_29 AC 99 ms
75,516 KB
testcase_30 AC 204 ms
75,524 KB
testcase_31 AC 397 ms
75,652 KB
testcase_32 AC 122 ms
75,516 KB
testcase_33 AC 98 ms
75,516 KB
testcase_34 AC 676 ms
75,652 KB
testcase_35 AC 113 ms
75,516 KB
testcase_36 AC 94 ms
75,516 KB
testcase_37 AC 70 ms
75,516 KB
testcase_38 AC 144 ms
75,516 KB
testcase_39 AC 204 ms
75,524 KB
testcase_40 AC 204 ms
75,524 KB
testcase_41 AC 144 ms
75,516 KB
testcase_42 AC 247 ms
75,644 KB
testcase_43 AC 75 ms
75,516 KB
testcase_44 AC 122 ms
75,516 KB
testcase_45 AC 502 ms
75,652 KB
testcase_46 AC 106 ms
75,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#緑以下E

from itertools import combinations

N,K = map(int,input().split())
A = list(map(int,input().split()))
M = 998
MOD = 998244353
ans = 0
for S in combinations([i for i in range(N)],K):
    S = sum(A[i] for i in S)
    if S % MOD <= S % M: ans += 1

print(ans % M)
0