結果

問題 No.2561 みんな大好きmod 998
ユーザー hatonobuhatonobu
提出日時 2023-12-02 14:51:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 531 ms / 4,000 ms
コード長 564 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,000 KB
最終ジャッジ日時 2023-12-02 14:52:01
合計ジャッジ時間 9,290 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
55,732 KB
testcase_01 AC 76 ms
75,996 KB
testcase_02 AC 42 ms
55,732 KB
testcase_03 AC 506 ms
75,996 KB
testcase_04 AC 498 ms
75,868 KB
testcase_05 AC 487 ms
75,868 KB
testcase_06 AC 526 ms
76,000 KB
testcase_07 AC 43 ms
55,732 KB
testcase_08 AC 42 ms
55,732 KB
testcase_09 AC 53 ms
68,580 KB
testcase_10 AC 43 ms
55,732 KB
testcase_11 AC 125 ms
75,872 KB
testcase_12 AC 42 ms
55,732 KB
testcase_13 AC 44 ms
55,732 KB
testcase_14 AC 42 ms
55,732 KB
testcase_15 AC 531 ms
76,000 KB
testcase_16 AC 43 ms
55,732 KB
testcase_17 AC 42 ms
55,732 KB
testcase_18 AC 48 ms
61,160 KB
testcase_19 AC 384 ms
76,000 KB
testcase_20 AC 50 ms
64,456 KB
testcase_21 AC 43 ms
55,732 KB
testcase_22 AC 43 ms
55,732 KB
testcase_23 AC 48 ms
61,160 KB
testcase_24 AC 44 ms
55,732 KB
testcase_25 AC 42 ms
55,732 KB
testcase_26 AC 171 ms
75,872 KB
testcase_27 AC 503 ms
76,000 KB
testcase_28 AC 182 ms
75,872 KB
testcase_29 AC 92 ms
75,872 KB
testcase_30 AC 165 ms
76,000 KB
testcase_31 AC 307 ms
76,000 KB
testcase_32 AC 109 ms
75,872 KB
testcase_33 AC 92 ms
75,872 KB
testcase_34 AC 499 ms
76,000 KB
testcase_35 AC 89 ms
75,872 KB
testcase_36 AC 88 ms
75,872 KB
testcase_37 AC 73 ms
75,872 KB
testcase_38 AC 138 ms
75,872 KB
testcase_39 AC 164 ms
76,000 KB
testcase_40 AC 165 ms
76,000 KB
testcase_41 AC 126 ms
75,872 KB
testcase_42 AC 183 ms
75,872 KB
testcase_43 AC 73 ms
75,872 KB
testcase_44 AC 106 ms
75,872 KB
testcase_45 AC 401 ms
76,000 KB
testcase_46 AC 96 ms
75,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque,defaultdict
import itertools
import heapq
import bisect
import math

#sys.setrecursionlimit(10 ** 9)
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
ml = lambda: map(str, input().split())
li = lambda: list(mi())
li_st = lambda: list(map(str, input().split()))
lli = lambda n: [li() for _ in range(n)]
mod = 998244353

N,K = mi()
A = li()
ans = 0
for e in itertools.combinations(A,K):
    S = sum(e)
    if S % 998 >= S % mod:
        ans += 1

print(ans % 998)
0