import Control.Applicative ((<$>)) import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Text.Read as T import Text.Printf (printf) unsafeReadDec:: Integral a => T.Text -> a unsafeReadDec t = case T.decimal t of Right x -> fst x Left e -> error e computeMax :: (Integral a, RealFloat b) => [a] -> a -> b computeMax ls k = bis eps maxLength where eps = 10.0 ** (-9) maxLength = 10.0 ** 9 bis low high | high - low <= eps || (high - low) / low <= eps = mid | n >= k = bis mid high | otherwise = bis low mid where mid = (high + low) / 2 n = sum $ fmap (floor . (/ mid) . fromIntegral) ls main :: IO () main = do _ <- T.getLine ls <- fmap unsafeReadDec . T.words <$> T.getLine :: IO [Int] k <- unsafeReadDec <$> T.getLine :: IO Int printf "%.16f\n" (computeMax ls k :: Double)