結果

問題 No.5 数字のブロック
ユーザー rse
提出日時 2023-04-13 13:55:34
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 211 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 82,256 KB
実行使用メモリ 66,580 KB
最終ジャッジ日時 2024-10-09 11:52:59
合計ジャッジ時間 2,990 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
w = sorted((int(n) for n in input().split()))
count = 0
ww = w[0]
for i in range(l):
    if ww <= l:
        count += 1
        ww += w[i+1]
    else:
        break
print(count)
0