## CCO '00 P5 - Millikan's Oil Droplet Experiment

View as PDF

Points: 7
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
##### 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