結果

問題 No.2424 Josouzai
ユーザー taro2023taro2023
提出日時 2023-08-18 21:19:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,640 KB
最終ジャッジ日時 2024-05-06 03:02:27
合計ジャッジ時間 4,252 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,624 KB
testcase_01 AC 25 ms
10,496 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 57 ms
17,136 KB
testcase_05 AC 134 ms
32,640 KB
testcase_06 AC 141 ms
32,360 KB
testcase_07 AC 139 ms
32,232 KB
testcase_08 AC 145 ms
32,512 KB
testcase_09 AC 26 ms
10,624 KB
testcase_10 AC 45 ms
16,124 KB
testcase_11 AC 80 ms
27,508 KB
testcase_12 AC 70 ms
23,072 KB
testcase_13 AC 56 ms
17,188 KB
testcase_14 AC 84 ms
22,448 KB
testcase_15 AC 35 ms
12,288 KB
testcase_16 AC 122 ms
29,676 KB
testcase_17 AC 50 ms
15,464 KB
testcase_18 AC 53 ms
16,428 KB
testcase_19 AC 75 ms
20,692 KB
testcase_20 AC 128 ms
30,132 KB
testcase_21 AC 99 ms
25,676 KB
testcase_22 AC 56 ms
17,284 KB
testcase_23 AC 65 ms
18,576 KB
testcase_24 AC 41 ms
14,080 KB
testcase_25 AC 125 ms
31,244 KB
testcase_26 AC 102 ms
25,332 KB
testcase_27 AC 137 ms
31,968 KB
testcase_28 AC 117 ms
28,784 KB
testcase_29 AC 108 ms
27,028 KB
testcase_30 AC 46 ms
14,780 KB
testcase_31 AC 74 ms
19,896 KB
testcase_32 AC 141 ms
31,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b= map(int, input().split())
c = list(map(int, input().split()))
c=sorted(c)
e=0
if c[0]>b:
    print(0,b)
    exit()
for i in range(len(c)):
    e+=c[i]
    if e>=b:
        e-=c[i]
        break
print(i,b-e)
0