結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
shobonvip
|
| 提出日時 | 2020-03-28 12:56:16 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 22 ms / 5,000 ms |
| + 945µs | |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2026-10-10 06:04:55 |
| 合計ジャッジ時間 | 2,367 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
l=int(input())
n=int(input())
w=list(map(int,input().split()))
w.sort()
count = 0
total = 0
if sum(w)>l:
while total <= l:
total += w[count]
count += 1
print(count-1)
else:
print(n)
shobonvip