結果
問題 | No.5 数字のブロック |
ユーザー | BE: SEVENTH |
提出日時 | 2024-05-27 12:36:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-12-20 20:31:11 |
合計ジャッジ時間 | 2,308 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
def main(): answer = 0 box_limit = int(input()) box_count = int(input()) box_list = list(map(int, input().split())) sorted_box_list = sorted(box_list) for i in sorted_box_list: if box_limit < i: break else: box_limit -= i answer += 1 print(answer) if __name__ == '__main__': main()