結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
|
| 提出日時 | 2020-07-22 18:41:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 5,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 14,208 KB |
| 最終ジャッジ日時 | 2024-06-12 23:38:03 |
| 合計ジャッジ時間 | 3,117 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
# coding:utf-8
import statistics
hako_L = int(input())
block_num = int(input())
block_list = list(map(int, input().split()))
block_list = sorted(block_list)
list_center = statistics.median(block_list)
a = 0
i = 0
c = 0
while True:
try:
c += 1
a += block_list[i]
i += 1
if a > hako_L:
break
else:
continue
except IndexError:
break
print(c - 1)