結果

問題 No.2424 Josouzai
ユーザー 坂口春斗
提出日時 2024-05-21 00:00:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,636 KB
最終ジャッジ日時 2024-12-20 18:02:19
合計ジャッジ時間 5,905 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

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