結果

問題 No.2424 Josouzai
ユーザー fiblonariafiblonaria
提出日時 2023-08-24 11:29:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 82,072 KB
実行使用メモリ 110,208 KB
最終ジャッジ日時 2024-06-02 03:06:44
合計ジャッジ時間 4,058 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,096 KB
testcase_01 AC 34 ms
51,712 KB
testcase_02 AC 35 ms
51,584 KB
testcase_03 AC 35 ms
51,584 KB
testcase_04 AC 62 ms
75,008 KB
testcase_05 AC 128 ms
102,036 KB
testcase_06 AC 123 ms
108,544 KB
testcase_07 AC 120 ms
108,672 KB
testcase_08 AC 127 ms
101,908 KB
testcase_09 AC 34 ms
51,968 KB
testcase_10 AC 49 ms
72,576 KB
testcase_11 AC 75 ms
99,968 KB
testcase_12 AC 65 ms
90,368 KB
testcase_13 AC 60 ms
74,496 KB
testcase_14 AC 77 ms
87,040 KB
testcase_15 AC 41 ms
62,336 KB
testcase_16 AC 105 ms
105,212 KB
testcase_17 AC 53 ms
70,016 KB
testcase_18 AC 55 ms
72,448 KB
testcase_19 AC 72 ms
84,096 KB
testcase_20 AC 110 ms
105,076 KB
testcase_21 AC 92 ms
94,592 KB
testcase_22 AC 60 ms
74,624 KB
testcase_23 AC 65 ms
78,592 KB
testcase_24 AC 50 ms
67,328 KB
testcase_25 AC 118 ms
110,208 KB
testcase_26 AC 93 ms
95,360 KB
testcase_27 AC 117 ms
108,928 KB
testcase_28 AC 103 ms
100,736 KB
testcase_29 AC 96 ms
98,944 KB
testcase_30 AC 50 ms
67,328 KB
testcase_31 AC 71 ms
81,024 KB
testcase_32 AC 114 ms
109,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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