結果

問題 No.2561 みんな大好きmod 998
ユーザー kamath0165kamath0165
提出日時 2023-12-02 16:48:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,352 ms / 4,000 ms
コード長 233 bytes
コンパイル時間 503 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 377,088 KB
最終ジャッジ日時 2023-12-02 16:49:22
合計ジャッジ時間 28,978 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
9,728 KB
testcase_01 AC 110 ms
24,704 KB
testcase_02 AC 25 ms
9,728 KB
testcase_03 AC 2,308 ms
377,088 KB
testcase_04 AC 2,200 ms
377,088 KB
testcase_05 AC 2,352 ms
377,088 KB
testcase_06 AC 2,193 ms
377,088 KB
testcase_07 AC 28 ms
9,728 KB
testcase_08 AC 27 ms
9,728 KB
testcase_09 AC 31 ms
10,240 KB
testcase_10 AC 26 ms
9,728 KB
testcase_11 AC 418 ms
58,880 KB
testcase_12 AC 27 ms
9,728 KB
testcase_13 AC 26 ms
9,728 KB
testcase_14 AC 26 ms
9,728 KB
testcase_15 AC 2,238 ms
377,088 KB
testcase_16 AC 29 ms
9,728 KB
testcase_17 AC 27 ms
9,728 KB
testcase_18 AC 26 ms
9,856 KB
testcase_19 AC 1,609 ms
272,256 KB
testcase_20 AC 27 ms
9,856 KB
testcase_21 AC 26 ms
9,728 KB
testcase_22 AC 25 ms
9,728 KB
testcase_23 AC 28 ms
9,856 KB
testcase_24 AC 26 ms
9,728 KB
testcase_25 AC 27 ms
9,728 KB
testcase_26 AC 492 ms
76,928 KB
testcase_27 AC 2,154 ms
377,088 KB
testcase_28 AC 653 ms
100,352 KB
testcase_29 AC 194 ms
34,816 KB
testcase_30 AC 526 ms
96,768 KB
testcase_31 AC 1,114 ms
194,432 KB
testcase_32 AC 268 ms
48,256 KB
testcase_33 AC 208 ms
34,816 KB
testcase_34 AC 2,121 ms
377,088 KB
testcase_35 AC 178 ms
33,408 KB
testcase_36 AC 196 ms
33,408 KB
testcase_37 AC 95 ms
20,224 KB
testcase_38 AC 365 ms
58,880 KB
testcase_39 AC 563 ms
96,768 KB
testcase_40 AC 609 ms
96,768 KB
testcase_41 AC 351 ms
58,880 KB
testcase_42 AC 688 ms
100,352 KB
testcase_43 AC 109 ms
20,224 KB
testcase_44 AC 271 ms
45,184 KB
testcase_45 AC 1,675 ms
272,256 KB
testcase_46 AC 248 ms
40,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as it
n,k= map(int,input().split())
a= list(map(int,input().split()))
ans= 0
num= list(it.combinations(a,k))
for i in range(len(num)):
  x= sum(num[i])
  if (x % 998244353) <= (x % 998):
    ans += 1
print(ans % 998)
0