https://www.acmicpc.net/problem/1654
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int k=s.nextInt();
int n=s.nextInt();
int arr[]=new int[k];
for(int i=0;i<k;i++){
arr[i]=s.nextInt();
}
Arrays.sort(arr);
long max=arr[k-1];
long min=1;
long mid=0;
while(min<=max){
long count=0;
mid=(min+max)/2;
for(int i=0;i<k;i++){
count+=arr[i]/mid;
}
if(count>=n) min=mid+1;
else if(count<n) max=mid-1;
}
System.out.print(max);
}
}