結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
flax_flux
|
| 提出日時 | 2018-03-03 14:14:51 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 22 ms / 5,000 ms |
| + 61µs | |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 12,032 KB |
| 最終ジャッジ日時 | 2026-09-25 19:58:00 |
| 合計ジャッジ時間 | 2,344 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
length = int(input())
number = int(input())
box_list = list(map(int, input().split()))
box_list.sort()
total_length = 0
for i, j in enumerate(box_list):
total_length += j
if total_length <= length:
if i +1 == len(box_list) and i + 1 <= number:
print(str(i + 1))
break
else:
continue
else:
print(str(i))
break
flax_flux