結果

問題 No.2424 Josouzai
ユーザー 👑 rin204rin204
提出日時 2023-09-18 19:12:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 86,484 KB
実行使用メモリ 104,064 KB
最終ジャッジ日時 2023-09-18 19:12:23
合計ジャッジ時間 9,217 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,028 KB
testcase_01 AC 68 ms
71,172 KB
testcase_02 AC 71 ms
71,296 KB
testcase_03 AC 70 ms
71,256 KB
testcase_04 AC 97 ms
84,624 KB
testcase_05 AC 155 ms
101,856 KB
testcase_06 AC 153 ms
101,692 KB
testcase_07 AC 156 ms
101,696 KB
testcase_08 AC 154 ms
101,908 KB
testcase_09 AC 70 ms
71,264 KB
testcase_10 AC 85 ms
83,804 KB
testcase_11 AC 110 ms
104,064 KB
testcase_12 AC 98 ms
97,408 KB
testcase_13 AC 94 ms
84,688 KB
testcase_14 AC 111 ms
93,772 KB
testcase_15 AC 77 ms
76,716 KB
testcase_16 AC 145 ms
99,572 KB
testcase_17 AC 88 ms
81,504 KB
testcase_18 AC 93 ms
83,560 KB
testcase_19 AC 106 ms
91,400 KB
testcase_20 AC 144 ms
99,632 KB
testcase_21 AC 125 ms
99,000 KB
testcase_22 AC 94 ms
84,712 KB
testcase_23 AC 99 ms
87,608 KB
testcase_24 AC 86 ms
79,716 KB
testcase_25 AC 152 ms
101,868 KB
testcase_26 AC 125 ms
99,040 KB
testcase_27 AC 154 ms
100,704 KB
testcase_28 AC 136 ms
101,900 KB
testcase_29 AC 130 ms
102,184 KB
testcase_30 AC 85 ms
79,608 KB
testcase_31 AC 106 ms
89,716 KB
testcase_32 AC 152 ms
101,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
ans = 0
for a in A:
    if k >= a:
        k -= a
        ans += 1

print(ans, k)
0