結果

問題 No.2424 Josouzai
ユーザー miho-4miho-4
提出日時 2023-08-18 21:04:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 103,980 KB
最終ジャッジ日時 2023-08-18 21:04:58
合計ジャッジ時間 5,842 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,412 KB
testcase_01 AC 70 ms
71,296 KB
testcase_02 AC 68 ms
71,408 KB
testcase_03 AC 71 ms
71,592 KB
testcase_04 AC 100 ms
84,808 KB
testcase_05 AC 160 ms
101,768 KB
testcase_06 AC 157 ms
101,632 KB
testcase_07 AC 160 ms
101,848 KB
testcase_08 AC 157 ms
101,768 KB
testcase_09 AC 71 ms
71,224 KB
testcase_10 AC 85 ms
84,220 KB
testcase_11 AC 108 ms
103,980 KB
testcase_12 AC 100 ms
97,540 KB
testcase_13 AC 97 ms
85,048 KB
testcase_14 AC 113 ms
93,844 KB
testcase_15 AC 77 ms
76,760 KB
testcase_16 AC 146 ms
99,592 KB
testcase_17 AC 88 ms
81,688 KB
testcase_18 AC 92 ms
83,712 KB
testcase_19 AC 106 ms
91,332 KB
testcase_20 AC 147 ms
99,832 KB
testcase_21 AC 124 ms
99,052 KB
testcase_22 AC 120 ms
84,584 KB
testcase_23 AC 99 ms
87,856 KB
testcase_24 AC 85 ms
79,620 KB
testcase_25 AC 154 ms
101,856 KB
testcase_26 AC 151 ms
99,172 KB
testcase_27 AC 155 ms
100,972 KB
testcase_28 AC 136 ms
102,020 KB
testcase_29 AC 129 ms
102,212 KB
testcase_30 AC 84 ms
79,996 KB
testcase_31 AC 103 ms
89,708 KB
testcase_32 AC 154 ms
101,752 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