結果

問題 No.5 数字のブロック
ユーザー Shoya SATO
提出日時 2020-10-08 15:01:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-07-20 05:53:44
合計ジャッジ時間 2,298 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

l=int(input())
n=int(input())
w=list(map(int,input().split()))
w.sort()
a=0
b=0


for x in w:
  if a+x >l:
    print(b)
    break
  else:
    a+=x
    b+=1
0