結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
|
| 提出日時 | 2024-05-27 12:11:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 463 bytes |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-12-20 20:31:02 |
| 合計ジャッジ時間 | 2,333 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 20 |
ソースコード
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)
# print(each_box_width_sort)
for i in each_box_width_sort:
if sumed_width < box_width:
sumed_width += i
sumed_list.append(sumed_width)
# print(sumed_list)
# print(sumed_width)
print(len(sumed_list))
if __name__ == '__main__':
main()