2000 Canadian Computing Competition, Stage 2

Day 2, Problem 2: Millikan's Oil Droplet Experiment

Millikan's apparatus Millikan's famous Oil Droplet Experiment showed that electrical charge is quantized; that is that the electrical charge on any object is the sum of a number of elementary electrical charges. The electron is the most common subatomic particle that carries a single elementary electrical charge.

Millikan's experiment involved measuring the charge on several oil droplets, and showing that each charge was a multiple of some smaller charge. Your friend, the physics enthusiast, has to reproduce Millikan's experiment. She has looked after constructing the apparatus and taking the measurements. Her measurements are pretty good for what can be achieved in a high school laboratory: the maximum error on any given measurement is +/- 1%.

Given the measurements as input, your program must find the maximum possible value for the elementary charge consistent with the measurements. That is, each measurement, plus or minus an error of 1% or less, must be a multiple of the elementary charge.

Input

The input contains an integer n (1 ≤ n ≤ 100), the number of oil droplets. This is followed by n real numbers on a single line; these represent the charge measured on each droplet.

Output

The output should be a single number, the maximum possible elementary charge, correct to 4 decimal places.

Sample Input

3
3.01 5.93 12.07

Sample Output

2.9947

All Submissions
Best Solutions


Point Value: 15
Time Limit: 2.00s
Memory Limit: 16M
Added: Apr 19, 2009

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

Assume that each charge is no larger than 2 million.