結果

問題 No.2424 Josouzai
ユーザー Meso MesoMeso Meso
提出日時 2024-04-09 20:45:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 32,640 KB
最終ジャッジ日時 2024-04-09 20:45:45
合計ジャッジ時間 4,292 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,624 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 59 ms
17,260 KB
testcase_05 AC 146 ms
32,640 KB
testcase_06 AC 142 ms
32,364 KB
testcase_07 AC 143 ms
32,364 KB
testcase_08 AC 142 ms
32,640 KB
testcase_09 AC 26 ms
10,624 KB
testcase_10 AC 44 ms
16,388 KB
testcase_11 AC 82 ms
27,612 KB
testcase_12 AC 68 ms
23,196 KB
testcase_13 AC 59 ms
17,316 KB
testcase_14 AC 84 ms
22,576 KB
testcase_15 AC 35 ms
12,416 KB
testcase_16 AC 131 ms
29,808 KB
testcase_17 AC 53 ms
15,596 KB
testcase_18 AC 54 ms
16,564 KB
testcase_19 AC 73 ms
20,824 KB
testcase_20 AC 125 ms
30,380 KB
testcase_21 AC 103 ms
25,796 KB
testcase_22 AC 59 ms
17,152 KB
testcase_23 AC 68 ms
18,704 KB
testcase_24 AC 45 ms
14,160 KB
testcase_25 AC 133 ms
31,496 KB
testcase_26 AC 103 ms
25,464 KB
testcase_27 AC 137 ms
31,972 KB
testcase_28 AC 117 ms
29,032 KB
testcase_29 AC 113 ms
27,152 KB
testcase_30 AC 48 ms
14,472 KB
testcase_31 AC 76 ms
20,160 KB
testcase_32 AC 135 ms
31,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

A.sort()

i = 0
while k > A[i]:
    k -= A[i]
    i += 1

if i == 0:
    print(1, 0)
else:
    print(i, k)
0