Canadian Computing Competition: 1997 Stage 2, Day 2, Problem 1
A planet has moons revolving about it in constant clockwise coplanar circular orbits. How often do all the moons appear directly overhead as viewed from some point on the planet? We will call such a situation a "vertical alignment."
Input Specification
Your input consists of sets of data, where is the first integer in the input: each set consists of an integer , indicating the number of moons, followed by distinct positive integers, one per line, indicating the exact period of revolution, , for each moon, in days.
Output Specification
For each of the sets of data, generate a line of output indicating the interval in days between consecutive vertical alignments up to an absolute error of .
Sample Input
3
2
20
30
3
20
30
40
2
10
3
Sample Output
60.00
120.00
4.29
Comments