結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,716 KB
testcase_01 AC 60 ms
75,204 KB
testcase_02 AC 34 ms
53,716 KB
testcase_03 AC 459 ms
75,204 KB
testcase_04 AC 430 ms
75,204 KB
testcase_05 AC 448 ms
75,204 KB
testcase_06 AC 436 ms
75,204 KB
testcase_07 AC 35 ms
53,716 KB
testcase_08 AC 33 ms
53,716 KB
testcase_09 AC 39 ms
59,904 KB
testcase_10 AC 32 ms
53,716 KB
testcase_11 AC 75 ms
75,188 KB
testcase_12 AC 33 ms
53,716 KB
testcase_13 AC 35 ms
53,716 KB
testcase_14 AC 34 ms
53,716 KB
testcase_15 AC 277 ms
75,204 KB
testcase_16 AC 33 ms
53,716 KB
testcase_17 AC 33 ms
53,716 KB
testcase_18 AC 42 ms
59,904 KB
testcase_19 AC 265 ms
75,204 KB
testcase_20 AC 38 ms
59,904 KB
testcase_21 AC 33 ms
53,716 KB
testcase_22 AC 33 ms
53,716 KB
testcase_23 AC 35 ms
59,904 KB
testcase_24 AC 39 ms
53,716 KB
testcase_25 AC 33 ms
53,716 KB
testcase_26 AC 88 ms
75,188 KB
testcase_27 AC 429 ms
75,204 KB
testcase_28 AC 102 ms
75,188 KB
testcase_29 AC 70 ms
75,188 KB
testcase_30 AC 135 ms
75,204 KB
testcase_31 AC 243 ms
75,204 KB
testcase_32 AC 68 ms
75,188 KB
testcase_33 AC 60 ms
75,188 KB
testcase_34 AC 437 ms
75,204 KB
testcase_35 AC 58 ms
75,188 KB
testcase_36 AC 66 ms
75,188 KB
testcase_37 AC 52 ms
70,196 KB
testcase_38 AC 75 ms
75,188 KB
testcase_39 AC 143 ms
75,204 KB
testcase_40 AC 135 ms
75,204 KB
testcase_41 AC 76 ms
75,188 KB
testcase_42 AC 103 ms
75,188 KB
testcase_43 AC 46 ms
70,196 KB
testcase_44 AC 67 ms
75,188 KB
testcase_45 AC 317 ms
75,204 KB
testcase_46 AC 61 ms
75,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

class Input_kyopro:
    def II(self): return int(input())
    def MI(self): return map(int,input().split())
    def MS(self): return map(str,input().split())
    def LMI(self): return list(self.MI())
    def LMS(self): return list(self.MS())
    def LLI(self,N): return [self.LMI() for _ in range(N)]
    def LLS(self,N): return [self.LMS() for _ in range(N)]
    def LS(self,N): return [input() for _ in range(N)]
    def LSL(self,N): return [list(input()) for _ in range(N)]
    def LI(self,N): return [self.II() for _ in range(N)]
I=Input_kyopro()
#入力
import math
from itertools import combinations
Mod=998
N,K=I.MI()
A=I.LMI()
ans=0
for p in combinations(range(N),K):
    S=0
    for k in p:
        S+=A[k]
    if S%998244353 <= S%998:
        ans+=1
print(ans%998)
0