結果

問題 No.5 数字のブロック
ユーザー BE: SEVENTHBE: SEVENTH
提出日時 2024-05-27 11:40:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-12-20 20:30:59
合計ジャッジ時間 2,452 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():

  sumed_list = []
  sumed_width = 0
  box_width = int(input())
  box_counts = int(input())
  each_box_width = list(map(int, input().split()))
  each_box_width_sort = sorted(each_box_width)
  for i in each_box_width_sort:
    sumed_width += i
    if sumed_width < box_width:
      sumed_list.append(sumed_width)
  print(len(sumed_list))

if __name__ == '__main__':
  main()
0