結果

問題 No.2424 Josouzai
ユーザー 👑 tatyamtatyam
提出日時 2023-08-15 23:08:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 183 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 103,884 KB
最終ジャッジ日時 2023-08-17 20:55:04
合計ジャッジ時間 5,951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,300 KB
testcase_01 AC 75 ms
71,372 KB
testcase_02 AC 74 ms
71,108 KB
testcase_03 AC 74 ms
71,668 KB
testcase_04 AC 99 ms
85,120 KB
testcase_05 AC 163 ms
101,804 KB
testcase_06 AC 162 ms
101,904 KB
testcase_07 AC 183 ms
101,772 KB
testcase_08 AC 172 ms
101,964 KB
testcase_09 AC 75 ms
71,652 KB
testcase_10 AC 88 ms
84,264 KB
testcase_11 AC 114 ms
103,884 KB
testcase_12 AC 104 ms
97,228 KB
testcase_13 AC 100 ms
84,780 KB
testcase_14 AC 116 ms
93,740 KB
testcase_15 AC 83 ms
76,780 KB
testcase_16 AC 153 ms
99,808 KB
testcase_17 AC 96 ms
81,592 KB
testcase_18 AC 99 ms
83,424 KB
testcase_19 AC 115 ms
91,404 KB
testcase_20 AC 151 ms
99,732 KB
testcase_21 AC 128 ms
99,132 KB
testcase_22 AC 99 ms
84,800 KB
testcase_23 AC 105 ms
87,644 KB
testcase_24 AC 89 ms
79,788 KB
testcase_25 AC 160 ms
102,112 KB
testcase_26 AC 131 ms
99,172 KB
testcase_27 AC 160 ms
101,088 KB
testcase_28 AC 138 ms
102,136 KB
testcase_29 AC 131 ms
102,468 KB
testcase_30 AC 91 ms
79,968 KB
testcase_31 AC 111 ms
89,776 KB
testcase_32 AC 160 ms
101,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = sorted(map(int, input().split()))

ans = 0
for a in A:
    if a <= K:
        K -= a
        ans += 1

print(ans, K)
0