結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2018-01-19 02:03:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 195 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-12-24 08:07:35 |
合計ジャッジ時間 | 2,468 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 26 RE * 8 |
ソースコード
L = int(input()) N = int(input()) W_list = sorted(list(map(int, input().split()))) W_sum = 0 ans = 0 for i in range(N): W_sum += W_list[i] if W_sum + W_list[i + 1] < L: ans += 1 else: break print(ans)