結果

問題 No.2424 Josouzai
ユーザー tkykwtnbtkykwtnb
提出日時 2024-03-29 06:18:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 31,872 KB
最終ジャッジ日時 2024-03-29 06:18:45
合計ジャッジ時間 7,794 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,856 KB
testcase_01 AC 27 ms
9,856 KB
testcase_02 AC 28 ms
9,856 KB
testcase_03 AC 26 ms
9,856 KB
testcase_04 AC 60 ms
16,524 KB
testcase_05 AC 141 ms
31,872 KB
testcase_06 AC 139 ms
31,864 KB
testcase_07 AC 143 ms
31,864 KB
testcase_08 AC 143 ms
31,872 KB
testcase_09 AC 27 ms
9,856 KB
testcase_10 AC 46 ms
16,520 KB
testcase_11 AC 81 ms
29,516 KB
testcase_12 AC 67 ms
24,476 KB
testcase_13 AC 59 ms
16,520 KB
testcase_14 AC 87 ms
21,784 KB
testcase_15 AC 36 ms
11,624 KB
testcase_16 AC 127 ms
29,020 KB
testcase_17 AC 52 ms
14,788 KB
testcase_18 AC 55 ms
15,760 KB
testcase_19 AC 79 ms
20,032 KB
testcase_20 AC 127 ms
30,056 KB
testcase_21 AC 101 ms
24,656 KB
testcase_22 AC 58 ms
16,264 KB
testcase_23 AC 65 ms
17,896 KB
testcase_24 AC 55 ms
13,356 KB
testcase_25 AC 133 ms
31,020 KB
testcase_26 AC 102 ms
24,676 KB
testcase_27 AC 137 ms
31,188 KB
testcase_28 AC 120 ms
29,108 KB
testcase_29 AC 110 ms
26,112 KB
testcase_30 AC 45 ms
13,672 KB
testcase_31 AC 74 ms
19,360 KB
testcase_32 AC 137 ms
31,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
ans=0
for a in A:
    if a<=K:
        ans+=1
        K-=a
    else:
        break
print(ans,K)
0