結果

問題 No.2424 Josouzai
ユーザー superzugansuperzugan
提出日時 2023-09-10 07:36:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 29,980 KB
最終ジャッジ日時 2023-09-10 07:36:40
合計ジャッジ時間 8,545 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,980 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 15 ms
7,828 KB
testcase_03 AC 16 ms
7,952 KB
testcase_04 AC 57 ms
14,668 KB
testcase_05 AC 193 ms
29,936 KB
testcase_06 AC 175 ms
29,980 KB
testcase_07 AC 172 ms
29,796 KB
testcase_08 AC 170 ms
29,936 KB
testcase_09 AC 16 ms
7,880 KB
testcase_10 AC 43 ms
14,848 KB
testcase_11 AC 97 ms
27,700 KB
testcase_12 AC 76 ms
22,656 KB
testcase_13 AC 58 ms
14,876 KB
testcase_14 AC 94 ms
19,908 KB
testcase_15 AC 25 ms
9,792 KB
testcase_16 AC 151 ms
27,120 KB
testcase_17 AC 47 ms
12,880 KB
testcase_18 AC 51 ms
13,692 KB
testcase_19 AC 79 ms
18,096 KB
testcase_20 AC 146 ms
27,404 KB
testcase_21 AC 111 ms
22,580 KB
testcase_22 AC 55 ms
14,424 KB
testcase_23 AC 64 ms
15,972 KB
testcase_24 AC 36 ms
11,540 KB
testcase_25 AC 157 ms
28,432 KB
testcase_26 AC 116 ms
22,752 KB
testcase_27 AC 159 ms
29,252 KB
testcase_28 AC 135 ms
26,188 KB
testcase_29 AC 126 ms
24,188 KB
testcase_30 AC 38 ms
11,996 KB
testcase_31 AC 74 ms
17,456 KB
testcase_32 AC 161 ms
28,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
al=sorted(map(int,input().split()))
cnt=0
for i in range(n):
	if k-al[i]>=0:
		k-=al[i]
		cnt+=1
print(cnt,k)
0