結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2017-11-04 10:44:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-11-18 11:49:43 |
合計ジャッジ時間 | 1,966 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()