結果

問題 No.5 数字のブロック
ユーザー rse
提出日時 2023-04-08 21:29:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 60,556 KB
最終ジャッジ日時 2024-10-03 18:44:01
合計ジャッジ時間 2,892 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
w = list(map(int, input().split()))
w.sort()
ans = 0
count = 0
for i in range(n):
    count += w[i]
    if count > l:
        print(i)
        break
0