結果

問題 No.2561 みんな大好きmod 998
ユーザー くきみかんくきみかん
提出日時 2023-12-02 16:02:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,485 ms / 4,000 ms
コード長 224 bytes
コンパイル時間 834 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 377,204 KB
最終ジャッジ日時 2023-12-02 16:03:10
合計ジャッジ時間 30,044 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,984 KB
testcase_01 AC 126 ms
24,832 KB
testcase_02 AC 29 ms
9,984 KB
testcase_03 AC 2,272 ms
377,204 KB
testcase_04 AC 2,263 ms
377,204 KB
testcase_05 AC 2,485 ms
377,204 KB
testcase_06 AC 2,289 ms
377,204 KB
testcase_07 AC 31 ms
9,984 KB
testcase_08 AC 30 ms
9,984 KB
testcase_09 AC 35 ms
10,496 KB
testcase_10 AC 30 ms
9,984 KB
testcase_11 AC 380 ms
59,008 KB
testcase_12 AC 31 ms
9,984 KB
testcase_13 AC 30 ms
9,984 KB
testcase_14 AC 30 ms
9,984 KB
testcase_15 AC 2,437 ms
377,204 KB
testcase_16 AC 30 ms
9,984 KB
testcase_17 AC 29 ms
9,984 KB
testcase_18 AC 30 ms
10,112 KB
testcase_19 AC 1,739 ms
272,256 KB
testcase_20 AC 30 ms
10,112 KB
testcase_21 AC 30 ms
9,984 KB
testcase_22 AC 30 ms
9,984 KB
testcase_23 AC 30 ms
10,112 KB
testcase_24 AC 30 ms
9,984 KB
testcase_25 AC 30 ms
9,984 KB
testcase_26 AC 499 ms
77,056 KB
testcase_27 AC 2,180 ms
377,204 KB
testcase_28 AC 623 ms
100,480 KB
testcase_29 AC 196 ms
34,944 KB
testcase_30 AC 541 ms
96,896 KB
testcase_31 AC 1,115 ms
194,560 KB
testcase_32 AC 273 ms
48,384 KB
testcase_33 AC 194 ms
34,944 KB
testcase_34 AC 2,123 ms
377,204 KB
testcase_35 AC 181 ms
33,408 KB
testcase_36 AC 178 ms
33,408 KB
testcase_37 AC 107 ms
20,352 KB
testcase_38 AC 397 ms
59,008 KB
testcase_39 AC 604 ms
96,896 KB
testcase_40 AC 604 ms
96,896 KB
testcase_41 AC 382 ms
59,008 KB
testcase_42 AC 686 ms
100,480 KB
testcase_43 AC 105 ms
20,352 KB
testcase_44 AC 288 ms
45,312 KB
testcase_45 AC 1,786 ms
272,256 KB
testcase_46 AC 244 ms
40,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
n,k = map(int, input().split())
a = list(map(int, input().split()))

s = list(itertools.combinations(a,k))
cnt = 0
for i in s:
    v = sum(i)
    if v%998244353 <= v%998:
        cnt += 1
    
print(cnt%998)
0