結果

問題 No.2424 Josouzai
ユーザー 坂口春斗坂口春斗
提出日時 2023-08-25 18:48:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 29,928 KB
最終ジャッジ日時 2023-08-25 18:48:27
合計ジャッジ時間 5,206 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 15 ms
7,724 KB
testcase_02 AC 15 ms
7,740 KB
testcase_03 AC 15 ms
7,744 KB
testcase_04 AC 52 ms
14,800 KB
testcase_05 AC 153 ms
29,800 KB
testcase_06 AC 156 ms
29,812 KB
testcase_07 AC 158 ms
29,812 KB
testcase_08 AC 157 ms
29,928 KB
testcase_09 AC 16 ms
7,768 KB
testcase_10 AC 39 ms
14,688 KB
testcase_11 AC 84 ms
27,684 KB
testcase_12 AC 67 ms
22,596 KB
testcase_13 AC 53 ms
14,668 KB
testcase_14 AC 85 ms
19,940 KB
testcase_15 AC 24 ms
9,824 KB
testcase_16 AC 137 ms
27,052 KB
testcase_17 AC 42 ms
13,184 KB
testcase_18 AC 48 ms
13,636 KB
testcase_19 AC 73 ms
18,052 KB
testcase_20 AC 139 ms
28,244 KB
testcase_21 AC 103 ms
22,492 KB
testcase_22 AC 52 ms
14,456 KB
testcase_23 AC 60 ms
15,968 KB
testcase_24 AC 34 ms
11,740 KB
testcase_25 AC 142 ms
29,440 KB
testcase_26 AC 103 ms
22,664 KB
testcase_27 AC 151 ms
29,240 KB
testcase_28 AC 128 ms
27,284 KB
testcase_29 AC 114 ms
24,008 KB
testcase_30 AC 35 ms
11,968 KB
testcase_31 AC 70 ms
17,316 KB
testcase_32 AC 146 ms
29,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lands_cnt, drugs_cnt = map(int,input().split())
lands_list = [*map(int,input().split())]
sorted_lands_list =sorted(lands_list)

withered_lands_cnt = 0
for i in sorted_lands_list:
    if drugs_cnt >= i:
        drugs_cnt -= i
        withered_lands_cnt += 1

print(withered_lands_cnt, drugs_cnt)
0