結果
| 問題 |
No.2424 Josouzai
|
| コンテスト | |
| ユーザー |
liny_tail
|
| 提出日時 | 2024-08-13 16:39:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 253 ms / 2,000 ms |
| コード長 | 211 bytes |
| コンパイル時間 | 271 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 32,500 KB |
| 最終ジャッジ日時 | 2024-08-13 16:39:51 |
| 合計ジャッジ時間 | 5,572 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
N, K = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
A = sorted(A)
cnt = 0
while True:
if len(A) == 0:
break
if A[0] > K:
break
K -= A.pop(0)
cnt += 1
print(f'{cnt} {K}')
liny_tail