#template
def inputlist(): return [int(j) for j in input().split()]
#template
N,K = inputlist()
A = inputlist()
left = 0
right = 10**9+1
while right - left > 1:
    mid = (left+right)//2
    count = 0
    for i in range(N):
        count += A[i]//mid
        if A[i] % mid == 0:
            count -=1
    if count > K:
        left = mid
    else:
        right = mid
print(right) int(j) for j in input().split() for j in input().split() j input().split() ().split () input split for j in input().split() int(j) int j def inputlist(): return [int(j) for j in input().split()]
#template inputlist N,K = inputlist() N inputlist() inputlist K A = inputlist() A inputlist() inputlist left = 0 left 0 right = 10**9+1 right 10**9+1 10**9 10 9 1 while right - left > 1:
    mid = (left+right)//2
    count = 0
    for i in range(N):
        count += A[i]//mid
        if A[i] % mid == 0:
            count -=1
    if count > K:
        left = mid
    else:
        right = mid right - left > 1 right - left right left 1 mid = (left+right)//2 mid (left+right)//2 left+right left right 2 count = 0 count 0 for i in range(N):
        count += A[i]//mid
        if A[i] % mid == 0:
            count -=1
     i range(N) range N count += A[i]//mid count A[i]//mid A[i] A i mid if A[i] % mid == 0:
            count -=1
     A[i] % mid == 0 A[i] % mid A[i] A i mid 0 count -=1 count 1 if count > K:
        left = mid
    else:
        right = mid count > K count K left = mid left mid right = mid right mid print(right) print right A = inputlist() inputlist() A left = mid mid left mid = (left+right)//2 (left+right)//2 mid left = 0 0 left count += A[i]//mid A[i]//mid count right = mid mid right K = inputlist() inputlist() K count -=1 1 count def inputlist(): return [int(j) for j in input().split()]
#template def inputlist(): return [int(j) for j in input().split()]
#template inputlist right = 10**9+1 10**9+1 right count = 0 0 count N,K = inputlist() inputlist() N
#template
def inputlist(): return [int(j) for j in input().split()]
#template
N,K = inputlist()
A = inputlist()
left = 0
right = 10**9+1
while right - left > 1:
    mid = (left+right)//2
    count = 0
    for i in range(N):
        count += A[i]//mid
        if A[i] % mid == 0:
            count -=1
    if count > K:
        left = mid
    else:
        right = mid
print(right)
