結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
ok_adachi_jp
|
| 提出日時 | 2017-11-04 10:42:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 418 bytes |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-11-22 17:06:23 |
| 合計ジャッジ時間 | 2,245 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 34 |
ソースコード
# -*- coding: utf-8 -*-
def main():
box_width = int(input())
block_num = int(input())
block_widths = sorted(list(map(int, input().split())))
total_width = 0
count = 0
for width in block_widths:
total_width = total_width + width
if box_width <= total_width:
break
count = count + 1
print(str(count) + "\n")
if __name__ == '__main__':
main()
ok_adachi_jp