結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
kanoekakihito
|
| 提出日時 | 2016-09-13 20:37:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 272 bytes |
| コンパイル時間 | 101 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-11-17 04:58:35 |
| 合計ジャッジ時間 | 2,030 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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