結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
MrEMGration
|
| 提出日時 | 2019-03-24 16:49:28 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 292 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2026-09-08 23:02:40 |
| 合計ジャッジ時間 | 2,624 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 WA * 7 |
ソースコード
import sys
l=int(input())
n=int(input())
w=list(map(int,input().split()))
w.sort()
total=0
if w[0]>l:
print(0)
sys.exit()
else:
for i in range(len(w)):
if total+w[i] < l:
total+=w[i]
else:
print(i)
sys.exit()
print(len(w))
MrEMGration