結果

問題 No.2424 Josouzai
ユーザー vwxyzvwxyz
提出日時 2024-02-12 04:40:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 187 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 32,008 KB
最終ジャッジ日時 2024-02-12 04:40:23
合計ジャッジ時間 7,516 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,984 KB
testcase_01 AC 29 ms
9,984 KB
testcase_02 AC 28 ms
9,984 KB
testcase_03 AC 27 ms
9,984 KB
testcase_04 AC 64 ms
16,660 KB
testcase_05 AC 164 ms
32,008 KB
testcase_06 AC 159 ms
32,000 KB
testcase_07 AC 162 ms
32,000 KB
testcase_08 AC 160 ms
32,008 KB
testcase_09 AC 27 ms
9,984 KB
testcase_10 AC 51 ms
16,656 KB
testcase_11 AC 96 ms
29,656 KB
testcase_12 AC 79 ms
24,612 KB
testcase_13 AC 65 ms
16,656 KB
testcase_14 AC 97 ms
21,920 KB
testcase_15 AC 37 ms
11,760 KB
testcase_16 AC 173 ms
29,156 KB
testcase_17 AC 55 ms
14,924 KB
testcase_18 AC 58 ms
15,896 KB
testcase_19 AC 88 ms
20,168 KB
testcase_20 AC 149 ms
29,296 KB
testcase_21 AC 114 ms
24,792 KB
testcase_22 AC 63 ms
16,400 KB
testcase_23 AC 72 ms
18,032 KB
testcase_24 AC 46 ms
13,492 KB
testcase_25 AC 150 ms
30,516 KB
testcase_26 AC 114 ms
24,812 KB
testcase_27 AC 187 ms
31,324 KB
testcase_28 AC 138 ms
28,092 KB
testcase_29 AC 125 ms
26,248 KB
testcase_30 AC 47 ms
13,808 KB
testcase_31 AC 82 ms
19,496 KB
testcase_32 AC 157 ms
30,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
ans=0
for a in A:
	if K>=a:
		ans+=1
		K-=a
print(ans,K)
0