結果

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

ソースコード

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)
0