結果

問題 No.2424 Josouzai
ユーザー 坂口春斗坂口春斗
提出日時 2024-05-21 00:00:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,764 KB
最終ジャッジ日時 2024-05-21 00:00:18
合計ジャッジ時間 5,280 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 58 ms
17,228 KB
testcase_05 AC 134 ms
32,596 KB
testcase_06 AC 135 ms
32,360 KB
testcase_07 AC 133 ms
32,360 KB
testcase_08 AC 132 ms
32,764 KB
testcase_09 AC 26 ms
10,624 KB
testcase_10 AC 44 ms
16,380 KB
testcase_11 AC 77 ms
27,512 KB
testcase_12 AC 75 ms
23,200 KB
testcase_13 AC 55 ms
17,312 KB
testcase_14 AC 82 ms
22,576 KB
testcase_15 AC 34 ms
12,544 KB
testcase_16 AC 121 ms
29,800 KB
testcase_17 AC 48 ms
15,588 KB
testcase_18 AC 51 ms
16,556 KB
testcase_19 AC 72 ms
20,824 KB
testcase_20 AC 119 ms
29,940 KB
testcase_21 AC 94 ms
25,796 KB
testcase_22 AC 54 ms
17,288 KB
testcase_23 AC 61 ms
18,700 KB
testcase_24 AC 41 ms
14,200 KB
testcase_25 AC 124 ms
31,488 KB
testcase_26 AC 112 ms
25,592 KB
testcase_27 AC 129 ms
31,968 KB
testcase_28 AC 110 ms
29,036 KB
testcase_29 AC 102 ms
27,148 KB
testcase_30 AC 45 ms
14,516 KB
testcase_31 AC 74 ms
20,156 KB
testcase_32 AC 127 ms
31,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lands, drugs = map(int, input().split())
lands_lst = sorted(map(int, input().split()))

withered_lands = 0
for L in lands_lst:
    if drugs >= L:
        drugs -= L
    else:
        break
    withered_lands += 1

print(withered_lands, drugs)
0