結果

問題 No.2424 Josouzai
ユーザー es1aTes1aT
提出日時 2023-09-26 23:18:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 29,964 KB
最終ジャッジ日時 2023-09-26 23:18:11
合計ジャッジ時間 8,322 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,832 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,852 KB
testcase_04 AC 52 ms
14,720 KB
testcase_05 AC 165 ms
29,964 KB
testcase_06 AC 167 ms
29,888 KB
testcase_07 AC 161 ms
29,964 KB
testcase_08 AC 161 ms
29,844 KB
testcase_09 AC 15 ms
7,852 KB
testcase_10 AC 40 ms
14,712 KB
testcase_11 AC 86 ms
27,780 KB
testcase_12 AC 67 ms
22,596 KB
testcase_13 AC 52 ms
14,812 KB
testcase_14 AC 89 ms
19,876 KB
testcase_15 AC 24 ms
9,800 KB
testcase_16 AC 147 ms
27,012 KB
testcase_17 AC 42 ms
13,232 KB
testcase_18 AC 48 ms
13,836 KB
testcase_19 AC 75 ms
18,072 KB
testcase_20 AC 142 ms
28,316 KB
testcase_21 AC 104 ms
22,548 KB
testcase_22 AC 51 ms
14,464 KB
testcase_23 AC 60 ms
15,980 KB
testcase_24 AC 34 ms
11,668 KB
testcase_25 AC 143 ms
29,448 KB
testcase_26 AC 102 ms
22,576 KB
testcase_27 AC 154 ms
29,344 KB
testcase_28 AC 126 ms
27,396 KB
testcase_29 AC 110 ms
24,020 KB
testcase_30 AC 36 ms
11,840 KB
testcase_31 AC 69 ms
17,452 KB
testcase_32 AC 143 ms
29,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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