結果

問題 No.2424 Josouzai
ユーザー Qro
提出日時 2023-08-18 21:04:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 107,776 KB
最終ジャッジ日時 2024-11-28 04:44:53
合計ジャッジ時間 4,332 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
count=0
for i in range(N):
    if K-A[i] > 0:
        K-=A[i]
        count+=1

print(count,K)
0