#include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf INT_MAX/3 #define INF INT_MAX/3 #define PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) #define CLR(a) memset(a,0,sizeof a) #define pii pair #define pcc pair #define pic pair #define pci pair #define VS vector #define VI vector #define DEBUG(x) cout<<#x<<": "<b?b:a) #define MAX(a,b) (a>b?a:b) #define pi 2*acos(0.0) #define INFILE() freopen("in0.txt","r",stdin) #define OUTFILE()freopen("out0.txt","w",stdout) #define in scanf #define out printf #define LL long long #define ULL unsigned long long #define eps 1e-14 #define FST first #define SEC second int N; vector L; int K; bool check(double length) { int cnt = 0; for (int i = 0; i < L.size(); ++i) { cnt += (L[i] / length); } return (cnt >= K); } int main(void) { int maxL=0; cin >> N; REP(i, N) { int a; cin >> a; L.push_back(a); if (a > maxL) maxL = a; } cin >> K; double left = 0; double right = maxL + 1; for (int i = 0; i < 1000;++i){ double mid = (right + left) / 2.0; if (check(mid)) left = mid; else right = mid; } cout << std::fixed << setprecision(15); cout << left << endl; return 0; }