結果

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

ソースコード

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