結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-15 14:46:08 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 5,000 ms |
| + 18µs | |
| コード長 | 199 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 81,136 KB |
| 実行使用メモリ | 63,268 KB |
| 最終ジャッジ日時 | 2026-10-08 22:42:16 |
| 合計ジャッジ時間 | 3,249 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
l=int(input())
n=int(input())
W=list(map(int,input().split()))
W.sort()
cnt=0
width=0
for i in range(n):
if width+W[i]<=l:
cnt+=1
width+=W[i]
else:
break
print(cnt)