P28099 [洛谷] 『STA - R6』spec
提高-
题目描述

Problem Description

Define the spectrum \(\operatorname{Spec}(\alpha)\) of a real number \(\alpha\) as an infinite sequence of integers \(\lceil\alpha\rceil-1, \lceil2\alpha\rceil-1, \lceil3\alpha\rceil-1, \cdots\). For example, the beginning part of the spectrum of \(\frac{3}{5}\) is \(0, 1, 1, 2, 2, 3, 4, \cdots\).

Given \(n\) integers \(x_1, \cdots, x_n\), you need to find the largest real number \(\alpha\) such that for each element \(x_i\), \(x_i\) appears in \(\operatorname{Spec}(\alpha)\).

Input Format

The first line contains a positive integer \(n\).

The second line contains \(n\) positive integers \(x_1, x_2, \cdots, x_n\).

Output Format

A single line representing the largest \(\alpha\). Your answer is considered correct if the absolute error from the standard answer is less than \(10^{-5}\).

Sample Input and Output

Sample Input #1

3
1 2 3

Sample Output #1

1.3333333

Sample Input #2

3
2 4 7

Sample Output #2

2.5000000

Notes

This problem uses batched testing.

Data Range:
- Subtask 0 (10pts): \(n, x_i \le 100\).
- Subtask 1 (15pts): The valid answers form a continuous interval.
- Subtask 2 (25pts): Each \(x_i\) is a non-negative integer power of 2.
- Subtask 3 (50pts): No special restrictions.

For all data, \(1 \le n, x_i \le 1000\).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 1 2 3
样例输出
1.3333333