結果
| 問題 |
No.2424 Josouzai
|
| コンテスト | |
| ユーザー |
mattu34
|
| 提出日時 | 2023-08-18 21:49:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 133 ms / 2,000 ms |
| コード長 | 188 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 82,044 KB |
| 実行使用メモリ | 107,264 KB |
| 最終ジャッジ日時 | 2024-11-28 06:35:57 |
| 合計ジャッジ時間 | 4,072 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
now = K
ans = 0
i = 0
while i < N and now - A[i] >= 0:
now -= A[i]
i += 1
ans += 1
print(ans, now)
mattu34