結果

問題 No.2424 Josouzai
ユーザー 310icecrystal310icecrystal
提出日時 2023-08-18 21:02:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 107,520 KB
最終ジャッジ日時 2024-05-06 02:27:47
合計ジャッジ時間 4,781 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
51,584 KB
testcase_01 AC 51 ms
51,840 KB
testcase_02 AC 45 ms
52,096 KB
testcase_03 AC 41 ms
51,328 KB
testcase_04 AC 72 ms
73,856 KB
testcase_05 AC 144 ms
101,888 KB
testcase_06 AC 136 ms
107,392 KB
testcase_07 AC 139 ms
107,136 KB
testcase_08 AC 146 ms
101,632 KB
testcase_09 AC 41 ms
51,712 KB
testcase_10 AC 61 ms
71,552 KB
testcase_11 AC 87 ms
97,920 KB
testcase_12 AC 78 ms
88,320 KB
testcase_13 AC 70 ms
73,216 KB
testcase_14 AC 92 ms
85,376 KB
testcase_15 AC 52 ms
61,312 KB
testcase_16 AC 124 ms
102,528 KB
testcase_17 AC 64 ms
68,736 KB
testcase_18 AC 68 ms
71,040 KB
testcase_19 AC 86 ms
81,664 KB
testcase_20 AC 123 ms
102,912 KB
testcase_21 AC 105 ms
92,544 KB
testcase_22 AC 70 ms
72,576 KB
testcase_23 AC 76 ms
76,928 KB
testcase_24 AC 59 ms
65,664 KB
testcase_25 AC 129 ms
107,392 KB
testcase_26 AC 105 ms
93,056 KB
testcase_27 AC 135 ms
107,520 KB
testcase_28 AC 118 ms
98,304 KB
testcase_29 AC 111 ms
96,896 KB
testcase_30 AC 59 ms
66,176 KB
testcase_31 AC 81 ms
79,616 KB
testcase_32 AC 134 ms
107,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

A.sort()
for i in range(N):
    a = A[i]
    if K < a:
        print(i,K)
        exit()
    else:
        K -= a
print(N,K)
0