結果

問題 No.2561 みんな大好きmod 998
ユーザー mymelochanmymelochan
提出日時 2023-12-02 14:40:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 388 ms / 4,000 ms
コード長 671 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,988 KB
最終ジャッジ日時 2023-12-02 14:40:47
合計ジャッジ時間 7,861 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
55,724 KB
testcase_01 AC 66 ms
75,984 KB
testcase_02 AC 39 ms
55,724 KB
testcase_03 AC 364 ms
75,984 KB
testcase_04 AC 371 ms
75,984 KB
testcase_05 AC 380 ms
75,984 KB
testcase_06 AC 355 ms
75,988 KB
testcase_07 AC 40 ms
55,724 KB
testcase_08 AC 39 ms
55,724 KB
testcase_09 AC 50 ms
68,568 KB
testcase_10 AC 37 ms
55,724 KB
testcase_11 AC 100 ms
75,860 KB
testcase_12 AC 38 ms
55,724 KB
testcase_13 AC 38 ms
55,724 KB
testcase_14 AC 38 ms
55,724 KB
testcase_15 AC 388 ms
75,988 KB
testcase_16 AC 41 ms
55,724 KB
testcase_17 AC 38 ms
55,724 KB
testcase_18 AC 42 ms
61,156 KB
testcase_19 AC 293 ms
75,988 KB
testcase_20 AC 47 ms
64,448 KB
testcase_21 AC 38 ms
55,724 KB
testcase_22 AC 37 ms
55,724 KB
testcase_23 AC 43 ms
61,156 KB
testcase_24 AC 38 ms
55,724 KB
testcase_25 AC 38 ms
55,724 KB
testcase_26 AC 123 ms
75,860 KB
testcase_27 AC 376 ms
75,988 KB
testcase_28 AC 139 ms
75,860 KB
testcase_29 AC 77 ms
75,860 KB
testcase_30 AC 124 ms
75,988 KB
testcase_31 AC 212 ms
75,988 KB
testcase_32 AC 93 ms
75,860 KB
testcase_33 AC 80 ms
75,860 KB
testcase_34 AC 370 ms
75,988 KB
testcase_35 AC 78 ms
75,860 KB
testcase_36 AC 76 ms
75,860 KB
testcase_37 AC 63 ms
75,860 KB
testcase_38 AC 104 ms
75,860 KB
testcase_39 AC 129 ms
75,988 KB
testcase_40 AC 127 ms
75,988 KB
testcase_41 AC 100 ms
75,860 KB
testcase_42 AC 138 ms
75,860 KB
testcase_43 AC 63 ms
75,860 KB
testcase_44 AC 86 ms
75,860 KB
testcase_45 AC 292 ms
75,988 KB
testcase_46 AC 84 ms
75,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#############################################################

import sys
sys.setrecursionlimit(10**7)

from heapq import heappop,heappush
from collections import deque,defaultdict,Counter
from bisect import bisect_left, bisect_right
from itertools import product,combinations,permutations
from math import sin,cos
#from math import isqrt #DO NOT USE PyPy

ipt = sys.stdin.readline
iin = lambda :int(ipt())
lmin = lambda :list(map(int,ipt().split()))

#############################################################

m1 = 998
m2 = 998244353

N,K = lmin()
A = lmin()
cnt = 0
for p in combinations(A,K):
    S = sum(p)
    if S % m1 >= S % m2:
        cnt += 1

print(cnt%m1)
0