結果
| 問題 | 
                            No.5 数字のブロック
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-08-20 15:05:09 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 314 bytes | 
| コンパイル時間 | 93 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-10-13 10:36:36 | 
| 合計ジャッジ時間 | 2,161 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 34 | 
ソースコード
L = int(input().split())
N = int(input().split())
W_list = list(map(int, input().split()))
# L:箱の幅, N:ブロック数, W: ブロックの幅
W_list.sort()
count = 0
box_surplus = L
for w in W_list:
    if box_surplus >= w:
        box_surplus -= w
        count += 1
    else:
        break
print(count)