Canadian Computing Competition: 2000 Stage 2, Day 2, Problem 2
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 .
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 or less, must be a multiple of the elementary charge.
Input Specification
The input contains an integer , the number of oil droplets. This is followed by real numbers on a single line; these represent the charge measured on each droplet.
Output Specification
The output should be a single number, the maximum possible elementary charge, correct to decimal places.
Sample Input
3
3.01 5.93 12.07
Sample Output
2.9947
Comments