結果

問題 No.2561 みんな大好きmod 998
ユーザー hirayuu_ychirayuu_yc
提出日時 2023-12-02 15:18:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 499 ms / 4,000 ms
コード長 248 bytes
コンパイル時間 869 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 75,520 KB
最終ジャッジ日時 2024-09-26 18:26:57
合計ジャッジ時間 9,050 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
from itertools import combinations
ans=0
for i in combinations(list(range(N)),K):
    now=0
    for j in i:
        now+=A[j]
    if now%998244353<=now%998:
        ans+=1
print(ans%998)
0