結果

問題 No.5 数字のブロック
ユーザー ゆゆ
提出日時 2020-09-01 17:20:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 241 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-11-19 10:48:21
合計ジャッジ時間 2,490 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

l=int(input())  #size of big box
n=int(input())  #brock
w=list(map(int,input().split())) #brock widths
w.sort()
wsum =0
counter=0

print(w)

for i in w:
    wsum +=i 
    counter += 1
    if wsum > l:
        counter -= 1
    
print(counter)
0