結果

問題 No.2424 Josouzai
ユーザー fiblonariafiblonaria
提出日時 2023-08-24 11:29:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 105,184 KB
最終ジャッジ日時 2023-08-24 11:29:49
合計ジャッジ時間 5,703 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,528 KB
testcase_01 AC 65 ms
71,176 KB
testcase_02 AC 67 ms
71,216 KB
testcase_03 AC 75 ms
71,340 KB
testcase_04 AC 92 ms
85,400 KB
testcase_05 AC 156 ms
103,560 KB
testcase_06 AC 151 ms
103,164 KB
testcase_07 AC 154 ms
103,260 KB
testcase_08 AC 152 ms
103,220 KB
testcase_09 AC 69 ms
71,312 KB
testcase_10 AC 82 ms
84,696 KB
testcase_11 AC 103 ms
105,184 KB
testcase_12 AC 99 ms
98,464 KB
testcase_13 AC 92 ms
85,328 KB
testcase_14 AC 116 ms
94,684 KB
testcase_15 AC 79 ms
76,948 KB
testcase_16 AC 145 ms
99,512 KB
testcase_17 AC 89 ms
82,000 KB
testcase_18 AC 93 ms
83,908 KB
testcase_19 AC 109 ms
92,336 KB
testcase_20 AC 146 ms
99,680 KB
testcase_21 AC 124 ms
100,000 KB
testcase_22 AC 90 ms
85,300 KB
testcase_23 AC 95 ms
88,024 KB
testcase_24 AC 79 ms
80,004 KB
testcase_25 AC 147 ms
101,896 KB
testcase_26 AC 120 ms
100,064 KB
testcase_27 AC 149 ms
102,700 KB
testcase_28 AC 133 ms
103,216 KB
testcase_29 AC 130 ms
103,180 KB
testcase_30 AC 82 ms
80,076 KB
testcase_31 AC 101 ms
90,092 KB
testcase_32 AC 148 ms
102,684 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