結果

問題 No.2561 みんな大好きmod 998
ユーザー noriaokinoriaoki
提出日時 2023-12-02 15:37:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 594 ms / 4,000 ms
コード長 367 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,308 KB
最終ジャッジ日時 2023-12-02 15:37:25
合計ジャッジ時間 9,668 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 68 ms
75,308 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 594 ms
75,308 KB
testcase_04 AC 578 ms
75,304 KB
testcase_05 AC 592 ms
75,304 KB
testcase_06 AC 569 ms
75,304 KB
testcase_07 AC 36 ms
53,460 KB
testcase_08 AC 34 ms
53,460 KB
testcase_09 AC 42 ms
60,024 KB
testcase_10 AC 38 ms
53,460 KB
testcase_11 AC 99 ms
75,156 KB
testcase_12 AC 39 ms
53,460 KB
testcase_13 AC 40 ms
53,460 KB
testcase_14 AC 39 ms
53,460 KB
testcase_15 AC 397 ms
75,304 KB
testcase_16 AC 35 ms
53,460 KB
testcase_17 AC 34 ms
53,460 KB
testcase_18 AC 39 ms
59,896 KB
testcase_19 AC 356 ms
75,304 KB
testcase_20 AC 40 ms
59,896 KB
testcase_21 AC 34 ms
53,460 KB
testcase_22 AC 34 ms
53,460 KB
testcase_23 AC 39 ms
59,896 KB
testcase_24 AC 40 ms
53,460 KB
testcase_25 AC 35 ms
53,460 KB
testcase_26 AC 112 ms
75,156 KB
testcase_27 AC 567 ms
75,304 KB
testcase_28 AC 136 ms
75,156 KB
testcase_29 AC 72 ms
75,156 KB
testcase_30 AC 182 ms
75,304 KB
testcase_31 AC 310 ms
75,304 KB
testcase_32 AC 81 ms
75,156 KB
testcase_33 AC 71 ms
75,156 KB
testcase_34 AC 568 ms
75,304 KB
testcase_35 AC 72 ms
75,156 KB
testcase_36 AC 87 ms
75,156 KB
testcase_37 AC 54 ms
70,164 KB
testcase_38 AC 97 ms
75,156 KB
testcase_39 AC 175 ms
75,304 KB
testcase_40 AC 174 ms
75,304 KB
testcase_41 AC 96 ms
75,156 KB
testcase_42 AC 135 ms
75,156 KB
testcase_43 AC 52 ms
70,164 KB
testcase_44 AC 85 ms
75,156 KB
testcase_45 AC 445 ms
75,304 KB
testcase_46 AC 74 ms
75,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))
import itertools
ans = 0
for i in itertools.combinations(list(range(N)), K):
    S998 = 0
    S998244353 = 0
    for j in i:
        S998 += A[j]
        S998 %= 998
        S998244353 += A[j]
        S998244353 %= 998244353
    if S998 >= S998244353:
        ans += 1
        ans %= 998
print(ans)
0