結果

問題 No.5 数字のブロック
ユーザー ramendaisukiramendaisuki
提出日時 2020-03-14 20:45:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 237 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-11-23 21:28:31
合計ジャッジ時間 2,345 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 4 RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

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