https://www.acwing.com/problem/content/682/
#include<bits/stdc++.h>
using namespace std;
double len[100010];
int n,m;
int solve(double a)
{
int sum=0 ;
for(int i=1;i<=n;i++)
{
sum+=len[i]/a;
if(sum>=m)return 1;
}
return 0;
}
int main(){
double l=0,r=1e9;
cin>>n>>m;
for(int i=1;i<=n;i++)cin>>len[i];
while(r-l>1e-3)
{
double mid=(r+l)/2.0;
if(solve(mid))l=mid;
else r=mid;
}
printf("%.2lf\n",l);
return 0;
}