結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,624 KB
testcase_01 AC 26 ms
10,496 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 62 ms
17,008 KB
testcase_05 AC 145 ms
32,516 KB
testcase_06 AC 142 ms
32,232 KB
testcase_07 AC 138 ms
32,356 KB
testcase_08 AC 146 ms
32,640 KB
testcase_09 AC 29 ms
10,368 KB
testcase_10 AC 46 ms
16,376 KB
testcase_11 AC 83 ms
27,388 KB
testcase_12 AC 70 ms
22,940 KB
testcase_13 AC 63 ms
17,184 KB
testcase_14 AC 88 ms
22,448 KB
testcase_15 AC 35 ms
12,416 KB
testcase_16 AC 133 ms
29,800 KB
testcase_17 AC 53 ms
15,592 KB
testcase_18 AC 57 ms
16,560 KB
testcase_19 AC 79 ms
20,820 KB
testcase_20 AC 133 ms
30,384 KB
testcase_21 AC 105 ms
25,552 KB
testcase_22 AC 57 ms
17,288 KB
testcase_23 AC 67 ms
18,676 KB
testcase_24 AC 46 ms
14,332 KB
testcase_25 AC 137 ms
31,248 KB
testcase_26 AC 104 ms
25,340 KB
testcase_27 AC 138 ms
31,972 KB
testcase_28 AC 123 ms
29,036 KB
testcase_29 AC 111 ms
26,900 KB
testcase_30 AC 46 ms
14,648 KB
testcase_31 AC 76 ms
19,896 KB
testcase_32 AC 141 ms
31,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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