結果

問題 No.2424 Josouzai
ユーザー KudeKude
提出日時 2023-08-18 21:01:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 103,608 KB
最終ジャッジ日時 2023-08-18 21:02:09
合計ジャッジ時間 6,067 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,228 KB
testcase_01 AC 75 ms
71,288 KB
testcase_02 AC 75 ms
71,244 KB
testcase_03 AC 75 ms
71,424 KB
testcase_04 AC 99 ms
84,748 KB
testcase_05 AC 159 ms
101,380 KB
testcase_06 AC 157 ms
101,552 KB
testcase_07 AC 159 ms
101,692 KB
testcase_08 AC 160 ms
101,520 KB
testcase_09 AC 77 ms
71,476 KB
testcase_10 AC 89 ms
83,812 KB
testcase_11 AC 112 ms
103,608 KB
testcase_12 AC 100 ms
97,080 KB
testcase_13 AC 96 ms
84,384 KB
testcase_14 AC 115 ms
93,248 KB
testcase_15 AC 79 ms
76,272 KB
testcase_16 AC 147 ms
99,668 KB
testcase_17 AC 89 ms
81,136 KB
testcase_18 AC 94 ms
83,080 KB
testcase_19 AC 109 ms
91,168 KB
testcase_20 AC 149 ms
99,752 KB
testcase_21 AC 124 ms
98,588 KB
testcase_22 AC 95 ms
84,276 KB
testcase_23 AC 101 ms
87,276 KB
testcase_24 AC 87 ms
79,292 KB
testcase_25 AC 152 ms
101,968 KB
testcase_26 AC 124 ms
98,536 KB
testcase_27 AC 156 ms
100,580 KB
testcase_28 AC 136 ms
101,960 KB
testcase_29 AC 129 ms
101,692 KB
testcase_30 AC 87 ms
79,456 KB
testcase_31 AC 108 ms
89,180 KB
testcase_32 AC 156 ms
101,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
ans = 0
for a in sorted(map(int, input().split())):
    if a > k:
        break
    k -= a
    ans += 1
print(ans, k)
0