結果

問題 No.2424 Josouzai
ユーザー gr1msl3y
提出日時 2023-08-21 10:22:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 131 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 108,416 KB
最終ジャッジ日時 2024-12-14 20:35:03
合計ジャッジ時間 5,720 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
c,s=0,0
for a in A:
	if s+a<=K:
		s+=a
		c+=1

print(c,K-a)
0