結果

問題 No.2424 Josouzai
ユーザー titiatitia
提出日時 2023-08-20 04:15:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 29,892 KB
最終ジャッジ日時 2023-08-20 04:15:58
合計ジャッジ時間 7,442 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 15 ms
7,780 KB
testcase_02 AC 15 ms
7,820 KB
testcase_03 AC 15 ms
7,860 KB
testcase_04 AC 48 ms
14,792 KB
testcase_05 AC 126 ms
29,892 KB
testcase_06 AC 124 ms
29,888 KB
testcase_07 AC 125 ms
29,876 KB
testcase_08 AC 126 ms
29,824 KB
testcase_09 AC 14 ms
7,836 KB
testcase_10 AC 33 ms
14,764 KB
testcase_11 AC 70 ms
27,708 KB
testcase_12 AC 54 ms
22,640 KB
testcase_13 AC 44 ms
14,820 KB
testcase_14 AC 70 ms
20,044 KB
testcase_15 AC 22 ms
9,704 KB
testcase_16 AC 106 ms
26,996 KB
testcase_17 AC 37 ms
12,880 KB
testcase_18 AC 40 ms
13,720 KB
testcase_19 AC 60 ms
17,976 KB
testcase_20 AC 109 ms
27,340 KB
testcase_21 AC 85 ms
22,668 KB
testcase_22 AC 43 ms
14,324 KB
testcase_23 AC 59 ms
15,956 KB
testcase_24 AC 30 ms
11,464 KB
testcase_25 AC 114 ms
28,336 KB
testcase_26 AC 85 ms
22,644 KB
testcase_27 AC 118 ms
29,316 KB
testcase_28 AC 100 ms
26,168 KB
testcase_29 AC 92 ms
24,172 KB
testcase_30 AC 33 ms
11,968 KB
testcase_31 AC 59 ms
17,428 KB
testcase_32 AC 117 ms
28,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(N):
    if A[i]<=K:
        K-=A[i]
    else:
        print(i,K)
        break
else:
    print(N,K)
0