結果

問題 No.2424 Josouzai
ユーザー miho-4miho-4
提出日時 2023-08-18 21:04:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 108,544 KB
最終ジャッジ日時 2024-05-06 02:32:29
合計ジャッジ時間 4,277 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,840 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 40 ms
51,584 KB
testcase_03 AC 35 ms
51,968 KB
testcase_04 AC 65 ms
74,240 KB
testcase_05 AC 129 ms
101,888 KB
testcase_06 AC 126 ms
106,880 KB
testcase_07 AC 129 ms
107,136 KB
testcase_08 AC 133 ms
101,888 KB
testcase_09 AC 36 ms
51,584 KB
testcase_10 AC 55 ms
71,936 KB
testcase_11 AC 87 ms
98,432 KB
testcase_12 AC 76 ms
89,472 KB
testcase_13 AC 67 ms
73,984 KB
testcase_14 AC 85 ms
86,400 KB
testcase_15 AC 47 ms
62,592 KB
testcase_16 AC 117 ms
103,808 KB
testcase_17 AC 60 ms
69,760 KB
testcase_18 AC 62 ms
72,448 KB
testcase_19 AC 87 ms
82,688 KB
testcase_20 AC 116 ms
103,808 KB
testcase_21 AC 93 ms
93,440 KB
testcase_22 AC 63 ms
73,984 KB
testcase_23 AC 70 ms
77,312 KB
testcase_24 AC 52 ms
66,560 KB
testcase_25 AC 121 ms
108,544 KB
testcase_26 AC 96 ms
93,824 KB
testcase_27 AC 128 ms
107,392 KB
testcase_28 AC 109 ms
99,456 KB
testcase_29 AC 103 ms
97,536 KB
testcase_30 AC 58 ms
66,688 KB
testcase_31 AC 80 ms
80,384 KB
testcase_32 AC 129 ms
107,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
cnt=0
for e in L:
  if e<=k:
    k-=e
    cnt+=1
    
print(cnt,k)
0