` import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
int L[] = new int[N];
for (int i = 0; i < L.length; i) {
L[i] = sc.nextInt();
}
double l = 0, r = 1e9;
while (true) {
double mid = (l + r) / 2;
int cnt = 0;
for (int i = 0; i < L.length; i) {
cnt += L[i] / mid;
}
if (cnt >= M) {
l = mid;//多了,加大长度
} else {
r = mid;//少了,减小长度
}
if(Math.abs(r-l)<0.001)break;//perfect!
}
System.out.printf(“%.2f”, r);
}
} `