結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
kanoekakihito
|
| 提出日時 | 2016-09-13 20:37:33 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 498 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 20,700 KB |
| 最終ジャッジ日時 | 2026-05-12 06:10:00 |
| 合計ジャッジ時間 | 6,074 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 RE * 10 |
ソースコード
from collections import deque
L = int(input())
N = int(input())
"""if N == 1:
w = deque([int(input())])
else:
"""
w = deque(sorted(map(int, input().split(" "))))
s = 0
while s <= L:
try:
s += w.popleft()
except IndexError:
s.append(0)
break
print(N - len(w) - 1)
kanoekakihito