結果

問題 No.2424 Josouzai
ユーザー machoniumpmachoniump
提出日時 2023-09-12 22:19:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 29,952 KB
最終ジャッジ日時 2023-09-12 22:19:44
合計ジャッジ時間 5,112 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,016 KB
testcase_01 AC 15 ms
8,008 KB
testcase_02 AC 16 ms
8,180 KB
testcase_03 WA -
testcase_04 AC 68 ms
14,728 KB
testcase_05 AC 211 ms
29,952 KB
testcase_06 AC 192 ms
29,840 KB
testcase_07 AC 193 ms
29,872 KB
testcase_08 AC 206 ms
29,848 KB
testcase_09 AC 15 ms
8,112 KB
testcase_10 AC 48 ms
14,732 KB
testcase_11 AC 113 ms
27,680 KB
testcase_12 AC 87 ms
22,608 KB
testcase_13 AC 62 ms
14,832 KB
testcase_14 AC 103 ms
20,016 KB
testcase_15 AC 26 ms
10,352 KB
testcase_16 AC 168 ms
27,032 KB
testcase_17 AC 49 ms
13,580 KB
testcase_18 AC 57 ms
14,008 KB
testcase_19 AC 95 ms
18,092 KB
testcase_20 AC 173 ms
27,480 KB
testcase_21 AC 128 ms
22,524 KB
testcase_22 AC 60 ms
14,268 KB
testcase_23 AC 71 ms
16,000 KB
testcase_24 AC 39 ms
12,292 KB
testcase_25 AC 177 ms
28,428 KB
testcase_26 AC 122 ms
22,564 KB
testcase_27 AC 180 ms
29,224 KB
testcase_28 AC 169 ms
26,008 KB
testcase_29 AC 140 ms
24,116 KB
testcase_30 AC 42 ms
12,708 KB
testcase_31 AC 84 ms
17,436 KB
testcase_32 AC 182 ms
28,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
a=[0]+sorted(list(map(int,input().split())))
for i in range(n):
    a[i+1]+=a[i]
for i in range(n+1):
    if k<a[i]:
        if i==1:
            print(0,0)
            exit()
        print(i-1,k-a[i-1])
        exit()
0