結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,624 KB
testcase_01 AC 26 ms
10,624 KB
testcase_02 AC 25 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 60 ms
17,264 KB
testcase_05 AC 142 ms
32,644 KB
testcase_06 AC 138 ms
32,360 KB
testcase_07 AC 162 ms
32,364 KB
testcase_08 AC 144 ms
32,644 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 44 ms
16,380 KB
testcase_11 AC 82 ms
27,508 KB
testcase_12 AC 65 ms
23,200 KB
testcase_13 AC 55 ms
17,316 KB
testcase_14 AC 84 ms
22,576 KB
testcase_15 AC 34 ms
12,416 KB
testcase_16 AC 122 ms
29,804 KB
testcase_17 AC 48 ms
15,596 KB
testcase_18 AC 53 ms
16,564 KB
testcase_19 AC 72 ms
20,952 KB
testcase_20 AC 124 ms
30,380 KB
testcase_21 AC 99 ms
25,668 KB
testcase_22 AC 55 ms
17,188 KB
testcase_23 AC 77 ms
18,704 KB
testcase_24 AC 45 ms
14,164 KB
testcase_25 AC 133 ms
31,452 KB
testcase_26 AC 100 ms
25,464 KB
testcase_27 AC 134 ms
31,968 KB
testcase_28 AC 114 ms
29,032 KB
testcase_29 AC 108 ms
27,148 KB
testcase_30 AC 44 ms
14,596 KB
testcase_31 AC 73 ms
20,160 KB
testcase_32 AC 132 ms
31,984 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, k)
else:
    print(i, k)
0