結果

問題 No.2424 Josouzai
ユーザー KudeKude
提出日時 2023-08-18 21:01:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 107,392 KB
最終ジャッジ日時 2024-05-06 02:26:04
合計ジャッジ時間 4,235 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,840 KB
testcase_01 AC 36 ms
51,456 KB
testcase_02 AC 35 ms
51,712 KB
testcase_03 AC 35 ms
51,456 KB
testcase_04 AC 61 ms
73,472 KB
testcase_05 AC 125 ms
102,144 KB
testcase_06 AC 119 ms
107,136 KB
testcase_07 AC 129 ms
107,008 KB
testcase_08 AC 126 ms
101,888 KB
testcase_09 AC 37 ms
51,840 KB
testcase_10 AC 52 ms
71,424 KB
testcase_11 AC 78 ms
97,664 KB
testcase_12 AC 70 ms
88,960 KB
testcase_13 AC 62 ms
73,088 KB
testcase_14 AC 80 ms
85,632 KB
testcase_15 AC 46 ms
61,824 KB
testcase_16 AC 108 ms
102,784 KB
testcase_17 AC 56 ms
68,608 KB
testcase_18 AC 59 ms
71,040 KB
testcase_19 AC 75 ms
81,664 KB
testcase_20 AC 107 ms
102,784 KB
testcase_21 AC 92 ms
92,544 KB
testcase_22 AC 63 ms
72,832 KB
testcase_23 AC 65 ms
76,800 KB
testcase_24 AC 51 ms
65,920 KB
testcase_25 AC 114 ms
107,392 KB
testcase_26 AC 92 ms
93,184 KB
testcase_27 AC 120 ms
107,136 KB
testcase_28 AC 109 ms
98,432 KB
testcase_29 AC 102 ms
96,640 KB
testcase_30 AC 56 ms
66,048 KB
testcase_31 AC 77 ms
79,872 KB
testcase_32 AC 126 ms
107,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
ans = 0
for a in sorted(map(int, input().split())):
    if a > k:
        break
    k -= a
    ans += 1
print(ans, k)
0