#include #include #include #include // WA: Only tries integer framerates int main(){ int n, m; std::cin >> n >> m; std::vector xs; int x; for (int i = 0; i < n; i++) { std::cin >> x; xs.push_back(x); } float optt = 1000000000.0f; for (int f = 1; f <= m; f++) { float t = 0; for (int i = 0; i < n; i++) { int x = xs[i]; t += (f * x) / 1000 + ((f * x) % 1000 == 0 ? 0 : 1); } t = (float)t / f; if (t < optt) optt = t; } std::cout << std::setprecision(10) << optt << std::endl; }