結果

問題 No.2561 みんな大好きmod 998
ユーザー oginoshikibuoginoshikibu
提出日時 2023-12-02 14:56:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 512 ms / 4,000 ms
コード長 236 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,580 KB
最終ジャッジ日時 2023-12-02 14:57:00
合計ジャッジ時間 9,179 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 71 ms
75,580 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 499 ms
75,580 KB
testcase_04 AC 461 ms
75,448 KB
testcase_05 AC 462 ms
75,448 KB
testcase_06 AC 492 ms
75,580 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 36 ms
53,460 KB
testcase_09 AC 48 ms
66,496 KB
testcase_10 AC 36 ms
53,460 KB
testcase_11 AC 115 ms
75,580 KB
testcase_12 AC 38 ms
53,460 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 37 ms
53,460 KB
testcase_15 AC 465 ms
75,580 KB
testcase_16 AC 38 ms
53,460 KB
testcase_17 AC 40 ms
53,460 KB
testcase_18 AC 42 ms
59,008 KB
testcase_19 AC 362 ms
75,580 KB
testcase_20 AC 46 ms
62,396 KB
testcase_21 AC 36 ms
53,460 KB
testcase_22 AC 37 ms
53,460 KB
testcase_23 AC 42 ms
59,008 KB
testcase_24 AC 37 ms
53,460 KB
testcase_25 AC 37 ms
53,460 KB
testcase_26 AC 138 ms
75,580 KB
testcase_27 AC 497 ms
75,580 KB
testcase_28 AC 173 ms
75,580 KB
testcase_29 AC 85 ms
75,580 KB
testcase_30 AC 158 ms
75,580 KB
testcase_31 AC 271 ms
75,580 KB
testcase_32 AC 101 ms
75,580 KB
testcase_33 AC 86 ms
75,580 KB
testcase_34 AC 512 ms
75,580 KB
testcase_35 AC 83 ms
75,580 KB
testcase_36 AC 82 ms
75,580 KB
testcase_37 AC 66 ms
75,580 KB
testcase_38 AC 119 ms
75,580 KB
testcase_39 AC 151 ms
75,580 KB
testcase_40 AC 155 ms
75,580 KB
testcase_41 AC 121 ms
75,580 KB
testcase_42 AC 196 ms
75,580 KB
testcase_43 AC 66 ms
75,580 KB
testcase_44 AC 100 ms
75,580 KB
testcase_45 AC 372 ms
75,580 KB
testcase_46 AC 91 ms
75,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lmod=998244353
smod=998

n,k=map(int, input().split())
A=tuple(map(int, input().split()))

from itertools import combinations
ans=0

for X in combinations(A,k):
    s=sum(X)
    if s%lmod<=s%smod:
        ans+=1
    ans%=smod
print(ans)
0