結果

問題 No.2424 Josouzai
ユーザー lloyzlloyz
提出日時 2023-08-18 21:30:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 224 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 29,868 KB
最終ジャッジ日時 2023-08-18 21:30:34
合計ジャッジ時間 4,358 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,812 KB
testcase_01 AC 14 ms
7,728 KB
testcase_02 AC 14 ms
7,696 KB
testcase_03 WA -
testcase_04 AC 45 ms
14,676 KB
testcase_05 AC 118 ms
29,796 KB
testcase_06 AC 116 ms
29,792 KB
testcase_07 AC 119 ms
29,868 KB
testcase_08 AC 125 ms
29,844 KB
testcase_09 AC 15 ms
7,660 KB
testcase_10 AC 34 ms
14,632 KB
testcase_11 AC 71 ms
27,624 KB
testcase_12 AC 55 ms
22,528 KB
testcase_13 AC 45 ms
14,668 KB
testcase_14 AC 71 ms
19,916 KB
testcase_15 AC 22 ms
9,664 KB
testcase_16 AC 112 ms
26,808 KB
testcase_17 AC 37 ms
12,788 KB
testcase_18 AC 40 ms
13,648 KB
testcase_19 AC 61 ms
18,016 KB
testcase_20 AC 108 ms
27,316 KB
testcase_21 AC 83 ms
22,564 KB
testcase_22 AC 42 ms
14,344 KB
testcase_23 AC 50 ms
15,760 KB
testcase_24 AC 30 ms
11,408 KB
testcase_25 AC 112 ms
28,288 KB
testcase_26 AC 83 ms
22,412 KB
testcase_27 AC 120 ms
29,168 KB
testcase_28 AC 106 ms
25,936 KB
testcase_29 AC 90 ms
23,872 KB
testcase_30 AC 33 ms
11,844 KB
testcase_31 AC 59 ms
17,168 KB
testcase_32 AC 118 ms
28,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
ANS = [0, k]
for i in range(n):
    if ANS[1] > A[i]:
        ANS[0] += 1
        ANS[1] -= A[i]
    else:
        break
print(*ANS)
0