結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-08 19:25:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 186 bytes |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 81,844 KB |
| 実行使用メモリ | 61,376 KB |
| 最終ジャッジ日時 | 2024-11-16 01:41:43 |
| 合計ジャッジ時間 | 2,599 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
l = int(input())
n = int(input())
w = list(map(int,input().split()))
w.sort()
c = 0
for i in range(n):
if l >= w[i]:
l -= w[i]
c += 1
else:
print(c)
exit()
print(c)