from bisect import bisect
import math
n,k=map(int,input().split())
A=list(map(int,input().split()))


l,r = 0,max(A)

while l < r - 1:
  mid = (l+r)//2
  cnt = 0
  for a in A:
    cnt += math.ceil(a/mid) - 1
  #print(l,r,mid,cnt,k)
  if cnt <= k:
    r = mid
  else:
    l = mid
print(r) from bisect import bisect import math math n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k A=list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split l,r = 0,max(A) l 0 r max(A) max A while l < r - 1:
  mid = (l+r)//2
  cnt = 0
  for a in A:
    cnt += math.ceil(a/mid) - 1
  #print(l,r,mid,cnt,k)
  if cnt <= k:
    r = mid
  else:
    l = mid l < r - 1 l r - 1 r 1 mid = (l+r)//2 mid (l+r)//2 l+r l r 2 cnt = 0 cnt 0 for a in A:
    cnt += math.ceil(a/mid) - 1
  #print(l,r,mid,cnt,k)
   a A cnt += math.ceil(a/mid) - 1 cnt math.ceil(a/mid) - 1 math.ceil(a/mid) math.ceil math ceil a/mid a mid 1 if cnt <= k:
    r = mid
  else:
    l = mid cnt <= k cnt k r = mid r mid l = mid l mid print(r) print r n,k=map(int,input().split()) map(int,input().split()) n A=list(map(int,input().split())) list(map(int,input().split())) A r = 0,max(A) max(A) r r = mid mid r cnt = 0 0 cnt mid = (l+r)//2 (l+r)//2 mid cnt += math.ceil(a/mid) - 1 math.ceil(a/mid) - 1 cnt l,r = 0,max(A) 0 l l = mid mid l k=map(int,input().split()) map(int,input().split()) k
from bisect import bisect
import math
n,k=map(int,input().split())
A=list(map(int,input().split()))


l,r = 0,max(A)

while l < r - 1:
  mid = (l+r)//2
  cnt = 0
  for a in A:
    cnt += math.ceil(a/mid) - 1
  #print(l,r,mid,cnt,k)
  if cnt <= k:
    r = mid
  else:
    l = mid
print(r)
