import math
a = map(int, input().split())
b = list(a)
m = b[0]
n = b[1]
c = map(int, input().split())
L = list(c)
k = sum(L)
d = math.floor(k/m)
for i in range (0, k+1):
    e = d - i
    f = 0
    for i in range(0, n):
        f += math.floor(L[i]/e)
    if f >= m:
        break
    else:
        continue
print(e)

코드 길이는 300B인대 시간초과 떠서 걍 귀찬아서 안할생각.. 코딩뉴비 이정도면 ㅍㅅㅌㅊ?

- dc official App