結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
norioc
|
| 提出日時 | 2024-06-20 04:45:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 5,000 ms |
| コード長 | 188 bytes |
| コンパイル時間 | 516 ms |
| コンパイル使用メモリ | 82,336 KB |
| 実行使用メモリ | 60,968 KB |
| 最終ジャッジ日時 | 2024-06-20 04:45:57 |
| 合計ジャッジ時間 | 3,853 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
L = int(input())
N = int(input())
W = list(map(int, input().split()))
t = 0
for i, w in enumerate(sorted(W)):
if t+w > L:
print(i)
break
t += w
else:
print(N)
norioc