結果

問題 No.2424 Josouzai
ユーザー ohanaohana
提出日時 2023-08-25 12:43:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 173 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 103,612 KB
最終ジャッジ日時 2023-08-25 12:43:12
合計ジャッジ時間 9,229 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,324 KB
testcase_01 AC 67 ms
71,432 KB
testcase_02 AC 66 ms
71,240 KB
testcase_03 AC 67 ms
71,644 KB
testcase_04 AC 91 ms
84,732 KB
testcase_05 AC 150 ms
101,512 KB
testcase_06 AC 148 ms
101,964 KB
testcase_07 AC 150 ms
101,836 KB
testcase_08 AC 174 ms
101,376 KB
testcase_09 AC 66 ms
71,360 KB
testcase_10 AC 81 ms
83,816 KB
testcase_11 AC 104 ms
103,612 KB
testcase_12 AC 94 ms
97,336 KB
testcase_13 AC 92 ms
84,304 KB
testcase_14 AC 109 ms
93,352 KB
testcase_15 AC 74 ms
76,384 KB
testcase_16 AC 139 ms
99,924 KB
testcase_17 AC 83 ms
81,188 KB
testcase_18 AC 89 ms
83,132 KB
testcase_19 AC 122 ms
91,044 KB
testcase_20 AC 142 ms
99,820 KB
testcase_21 AC 118 ms
98,708 KB
testcase_22 AC 89 ms
84,244 KB
testcase_23 AC 94 ms
87,224 KB
testcase_24 AC 80 ms
79,244 KB
testcase_25 AC 145 ms
101,996 KB
testcase_26 AC 120 ms
98,544 KB
testcase_27 AC 149 ms
100,628 KB
testcase_28 AC 131 ms
102,060 KB
testcase_29 AC 133 ms
101,656 KB
testcase_30 AC 80 ms
79,568 KB
testcase_31 AC 99 ms
89,256 KB
testcase_32 AC 146 ms
101,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
for i in la:
    if k - i < 0:
        break
    ans += 1
    k -= i

print(ans, k)
0