結果

問題 No.2424 Josouzai
ユーザー Masa Ume
提出日時 2023-08-18 23:49:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 153 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,640 KB
最終ジャッジ日時 2024-11-28 11:28:55
合計ジャッジ時間 6,037 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
A.sort()

i=0
E=0
while i<N:
	E += A[i]
	i = i+1
	if E<K:
		continue

print(i-1,K-E+A[i-1])
0