import numpy as np
import sys 
N,K = map(int, input().split())
A = np.array(sys.stdin.readline().split(), np.int64)
maxa = np.max(A)
mina = maxa // (K+1)
while maxa > mina + 1:
    mid = (maxa + mina)// 2
    div = np.sum(np.ceil(A/mid-1))
    if div > K:
        mina = mid
    else:
        maxa = mid

print(maxa)
 import numpy as np numpy import sys sys N,K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K A = np.array(sys.stdin.readline().split(), np.int64) A np.array(sys.stdin.readline().split(), np.int64) np.array np array sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split np.int64 np int64 maxa = np.max(A) maxa np.max(A) np.max np max A mina = maxa // (K+1) mina maxa // (K+1) maxa K+1 K 1 while maxa > mina + 1:
    mid = (maxa + mina)// 2
    div = np.sum(np.ceil(A/mid-1))
    if div > K:
        mina = mid
    else:
        maxa = mid maxa > mina + 1 maxa mina + 1 mina 1 mid = (maxa + mina)// 2 mid (maxa + mina)// 2 maxa + mina maxa mina 2 div = np.sum(np.ceil(A/mid-1)) div np.sum(np.ceil(A/mid-1)) np.sum np sum np.ceil(A/mid-1) np.ceil np ceil A/mid-1 A/mid A mid 1 if div > K:
        mina = mid
    else:
        maxa = mid div > K div K mina = mid mina mid maxa = mid maxa mid print(maxa) print maxa div = np.sum(np.ceil(A/mid-1)) np.sum(np.ceil(A/mid-1)) div mina = mid mid mina maxa = np.max(A) np.max(A) maxa maxa = mid mid maxa K = map(int, input().split()) map(int, input().split()) K A = np.array(sys.stdin.readline().split(), np.int64) np.array(sys.stdin.readline().split(), np.int64) A mid = (maxa + mina)// 2 (maxa + mina)// 2 mid N,K = map(int, input().split()) map(int, input().split()) N mina = maxa // (K+1) maxa // (K+1) mina
import numpy as np
import sys 
N,K = map(int, input().split())
A = np.array(sys.stdin.readline().split(), np.int64)
maxa = np.max(A)
mina = maxa // (K+1)
while maxa > mina + 1:
    mid = (maxa + mina)// 2
    div = np.sum(np.ceil(A/mid-1))
    if div > K:
        mina = mid
    else:
        maxa = mid

print(maxa)

