結果

問題 No.2424 Josouzai
ユーザー noriocnorioc
提出日時 2023-08-18 22:34:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 800 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 109,056 KB
最終ジャッジ日時 2024-05-06 04:54:21
合計ジャッジ時間 4,445 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,840 KB
testcase_01 AC 36 ms
51,968 KB
testcase_02 AC 37 ms
51,712 KB
testcase_03 AC 37 ms
51,584 KB
testcase_04 AC 65 ms
73,984 KB
testcase_05 AC 135 ms
101,888 KB
testcase_06 AC 136 ms
108,800 KB
testcase_07 AC 129 ms
108,672 KB
testcase_08 AC 138 ms
101,888 KB
testcase_09 AC 37 ms
51,840 KB
testcase_10 AC 53 ms
71,808 KB
testcase_11 AC 81 ms
99,200 KB
testcase_12 AC 71 ms
89,600 KB
testcase_13 AC 63 ms
73,472 KB
testcase_14 AC 85 ms
86,656 KB
testcase_15 AC 46 ms
61,568 KB
testcase_16 AC 110 ms
104,320 KB
testcase_17 AC 60 ms
69,376 KB
testcase_18 AC 61 ms
71,808 KB
testcase_19 AC 78 ms
82,560 KB
testcase_20 AC 110 ms
104,704 KB
testcase_21 AC 94 ms
93,952 KB
testcase_22 AC 64 ms
73,600 KB
testcase_23 AC 70 ms
77,312 KB
testcase_24 AC 53 ms
66,048 KB
testcase_25 AC 117 ms
108,416 KB
testcase_26 AC 99 ms
93,824 KB
testcase_27 AC 125 ms
109,056 KB
testcase_28 AC 114 ms
100,224 KB
testcase_29 AC 101 ms
98,048 KB
testcase_30 AC 54 ms
66,688 KB
testcase_31 AC 77 ms
80,512 KB
testcase_32 AC 125 ms
108,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

k = K
for i, a in enumerate(sorted(A)):
    if k < a:
        print(i, k)
        break
    k -= a
else:
    print(N, k)
0