31.14m
import sys
input = sys.stdin.readline
m, n = list(map(int, input().rstrip().split()))
snacks = list(map(int, input().rstrip().split()))
res = 0
start = 1
end = 10 ** 9
while start <= end:
mid = (start + end) // 2
total = 0
for snack in snacks:
total += snack // mid
if total >= m:
res = max(res, mid)
start = mid + 1
elif total < m:
end = mid - 1
print(res)
이분탐색.. 감을 잡아야해